Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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}"
  • 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)
  • 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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read-only operation, it doesn't specify whether this returns all strategies at once or uses pagination, what format the rules are returned in, or any authentication requirements. The description is minimal and lacks important operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple listing tool and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, has output schema), the description is minimally complete. The output schema will document return values, so the description doesn't need to explain them. However, for a tool with no annotations, more behavioral context about how the listing works would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the baseline for this dimension is 4. The description appropriately doesn't discuss parameters since there are none, and the schema already fully documents the empty input object.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available routing strategies and their rules'), making the tool's purpose immediately understandable. It doesn't specifically differentiate from sibling tools like 'smart_route_request' or 'test_routing', but the listing function is distinct enough for basic understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'smart_route_request' and 'test_routing' that might involve routing logic, there's no indication of when a simple listing is appropriate versus more complex routing operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GongRzhe/ACP-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server