INNER CODE UNIT · Python

list_tools

marc-shade/world-intel-mcp · src/world_intel_mcp/server.py:126

async def list_tools() -> list[Tool]:
    return TOOLS


@server.call_tool()
async def call_tool(name: str, arguments: dict[str, Any] | None) -> list[TextContent]:
    args = arguments or {}
    logger.info("Tool call: %s(%s)", name, json.dumps(args, default=str)[:200])
    result = await _dispatch(name, args)
    return [TextContent(type="text", text=json.dumps(result, indent=2, default=str))]


# ---------------------------------------------------------------------------
# Entry point
# ---------------------------------------------------------------------------


async def _run() -> None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…