list_mcp_tools()
Convert raw MCP tool dicts into MCPToolInfo objects.
Usage
list_mcp_tools(
tools_data,
*,
server_url="",
)This is a synchronous helper for when you already have the tool list (e.g. from a cached list_tools() response). For live discovery, use discover_mcp_tools().
Parameters
tools_data: list[dict[str, Any]]-
A list of dicts, each with name,
description, andinputSchemakeys (matchingmcp.types.Tool). server_url: str = ""- Optional server URL to attach to each tool info.
Returns
list[MCPToolInfo]- Parsed tool descriptors.
Examples
import talk_box as tb
raw = [
{
"name": "greet",
"description": "Say hello",
"inputSchema": {"type": "object", "properties": {"name": {"type": "string"}}},
}
]
tools = tb.list_mcp_tools(raw)
tools[0].name # "greet"