from typing import Dict, Callable, Any
import logging

class ToolRegistry:
    def __init__(self):
        self._tools: Dict[str, Callable] = {}

    def register_tool(self, name: str, handler: Callable):
        self._tools[name] = handler
        logging.info(f"Tool registered: {name}")

    async def run_tool(self, name: str, **kwargs) -> Any:
        if name not in self._tools:
            raise ValueError(f"Tool {name} not found in registry")
        return await self._tools[name](**kwargs)

tool_registry = ToolRegistry()

# Example Tool Registration
async def sample_tool_handler(data: dict):
    return {"status": "success", "message": "Sample tool executed"}

tool_registry.register_tool("sample-tool", sample_tool_handler)
