MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / handle_list_tools

Function handle_list_tools

src/codegraphcontext/api/mcp_sse.py:20–30  ·  view source on GitHub ↗

List available tools (honors disabledTools from mcp.json).

()

Source from the content-addressed store, hash-verified

18
19@mcp_server.list_tools()
20async 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()
33async def handle_call_tool(name: str, arguments: dict | None) -> list[TextContent]:

Callers

nothing calls this directly

Calls 3

get_serverFunction · 0.90
itemsMethod · 0.80
appendMethod · 0.65

Tested by

no test coverage detected