"""
Tool Registry - Automatic tool discovery and registration.
Tools are organized in separate modules for maintainability.
Each tool module should define a `register(mcp, config)` function.
To add a new tool:
1. Create a new file in this directory (e.g., my_tool.py)
2. Define a register(mcp, config) function
3. Import and call it in register_all_tools() below
"""
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mcp.server.fastmcp import FastMCP
from ..config import ServerConfig
def register_all_tools(mcp: "FastMCP", config: "ServerConfig") -> None:
"""
Register all tools with the MCP server.
This function imports and registers tools from sub-modules.
Each tool module defines a `register(mcp, config)` function.
Args:
mcp: The FastMCP server instance
config: Server configuration
"""
# Import tool modules
from . import datetime_tool, echo_tool, file_tool
# Register each tool module
echo_tool.register(mcp, config)
datetime_tool.register(mcp, config)
file_tool.register(mcp, config)