List available tools (honors disabledTools from mcp.json).
()
| 18 | |
| 19 | @mcp_server.list_tools() |
| 20 | async def handle_list_tools() -> list[Tool]: |
| 21 | """List available tools (honors disabledTools from mcp.json).""" |
| 22 | server = get_server() |
| 23 | tools = [] |
| 24 | for name, defn in server.tools.items(): |
| 25 | tools.append(Tool( |
| 26 | name=name, |
| 27 | description=defn["description"], |
| 28 | inputSchema=defn["inputSchema"] |
| 29 | )) |
| 30 | return tools |
| 31 | |
| 32 | @mcp_server.call_tool() |
| 33 | async def handle_call_tool(name: str, arguments: dict | None) -> list[TextContent]: |
nothing calls this directly
no test coverage detected