list_routing_strategies
Retrieve available routing strategies and their rules to optimize communication between ACP agents and MCP clients.
Instructions
List all available routing strategies and their rules
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- acp_mcp_server/agent_router.py:249-288 (handler)The main handler function for the 'list_routing_strategies' MCP tool. It collects information about the default and custom routing strategies from the AgentRouter instance and returns them as a JSON string.@mcp.tool() async def list_routing_strategies() -> str: """List all available routing strategies and their rules""" try: strategies_info = {} # Include default strategy strategies_info["default"] = { "description": router.default_strategy.description, "rules": [ { "keywords": rule.keywords, "agent": rule.agent_name, "priority": rule.priority, "description": rule.description } for rule in router.default_strategy.rules ] } # Include custom strategies for name, strategy in router.strategies.items(): strategies_info[name] = { "description": strategy.description, "rules": [ { "keywords": rule.keywords, "agent": rule.agent_name, "priority": rule.priority, "description": rule.description } for rule in strategy.rules ] } return json.dumps(strategies_info, indent=2) except Exception as e: return f"Error: {e}"
- acp_mcp_server/server.py:84-89 (registration)Registration of all component tools, including the router tools (via register_router_tools) which registers the list_routing_strategies tool to the FastMCP instance.# Register component tools register_discovery_tools(self.mcp, self.discovery) register_bridge_tools(self.mcp, self.message_bridge) register_orchestrator_tools(self.mcp, self.orchestrator) register_router_tools(self.mcp, self.router) register_interactive_tools(self.mcp, self.interactive_manager)
- acp_mcp_server/server.py:25-25 (registration)Import of the register_router_tools function used to register the routing tools including list_routing_strategies.from .agent_router import AgentRouter, register_router_tools