""" Base tool interface. """ from abc import ABC, abstractmethod from typing import Any, Dict class BaseTool(ABC): """Base class for MCP tools.""" @property @abstractmethod def name(self) -> str: """Tool name.""" pass @property @abstractmethod def description(self) -> str: """Tool description.""" pass @abstractmethod def get_schema(self) -> Dict[str, Any]: """ Get tool schema for tools/list response. Returns: Dict with name, description, and inputSchema """ pass @abstractmethod def execute(self, arguments: Dict[str, Any]) -> Any: """ Execute the tool with given arguments. Args: arguments: Tool arguments Returns: Tool execution result """ pass