get_service_tools

View as MarkdownOpen in Claude

Start a temporary MCP client, retrieve the list of available tools, then stop the client. Useful for discovering a service’s capabilities without maintaining a persistent session.

Parameters

service_name
strRequired

Name of the service to query.

Returns

list[dict[str, Any]] — List of tool definition dictionaries from the MCP server.

Example

from signalwire.mcp_gateway import MCPManager
config = {
"services": {
"todo": {"command": ["python3", "todo_mcp.py"], "description": "Todo list", "enabled": True}
}
}
manager = MCPManager(config)
tools = manager.get_service_tools("todo")
for tool in tools:
print(f" {tool['name']}: {tool.get('description', '')}")