"""
MCP Tools for Odoo operations.
This module auto-registers all tool functions with the MCP server.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mcp.server.fastmcp import FastMCP
def register_all_tools(mcp: "FastMCP") -> None:
"""
Register all Odoo tools with the MCP server.
Args:
mcp: FastMCP server instance
"""
# Import tool modules to trigger registration
from . import (
contacts,
expenses,
hr,
invoices,
products,
projects,
sales,
timesheets,
utilities,
)
# Each module registers its tools via the @mcp.tool() decorator
# The modules receive the mcp instance via register_tools(mcp) function
projects.register_tools(mcp)
timesheets.register_tools(mcp)
expenses.register_tools(mcp)
contacts.register_tools(mcp)
invoices.register_tools(mcp)
sales.register_tools(mcp)
products.register_tools(mcp)
hr.register_tools(mcp)
utilities.register_tools(mcp)
__all__ = ["register_all_tools"]