Skip to main content
Glama

test_routing

Simulate agent selection for routing based on input text and strategy without actual execution, enabling efficient planning and testing for ACP-MCP Server integrations.

Instructions

Test routing without executing - shows which agent would be selected

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_textYes
strategyNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The test_routing MCP tool handler function. It tests which agent a given input_text would be routed to using the specified strategy, without executing the agent. Returns JSON with input, strategy, target_agent, routing_reason, and would_execute flag.
    @mcp.tool()
    async def test_routing(
        input_text: str,
        strategy: str = "default"
    ) -> str:
        """Test routing without executing - shows which agent would be selected"""
        
        try:
            target_agent, routing_reason = await router.route_request(input_text, strategy)
            
            result = {
                "input": input_text,
                "strategy": strategy,
                "target_agent": target_agent,
                "routing_reason": routing_reason,
                "would_execute": True
            }
            
            return json.dumps(result, indent=2)
            
        except Exception as e:
            return f"Error: {e}"
  • Registration of the router tools (including test_routing) by calling register_router_tools on the MCP instance with the AgentRouter instance.
    register_router_tools(self.mcp, self.router)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the key behavioral trait that this is a simulation ('without executing'), but lacks details on permissions, rate limits, or what the output looks like. The description is accurate but minimal for a tool with no annotation coverage.

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, front-loaded sentence with zero waste—every word contributes to understanding the tool's purpose and key behavior. It's appropriately sized for a simple tool.

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

Completeness4/5

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

Given the tool's low complexity (2 parameters, no nested objects) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the core purpose and behavioral constraint, though more parameter guidance would enhance it.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It implies 'input_text' is used for routing testing and 'strategy' might influence selection, but doesn't explain parameter meanings, formats, or constraints. The description adds minimal value beyond the schema's property names.

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

Purpose5/5

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

The description clearly states the tool's purpose with a specific verb ('test routing') and resource ('which agent would be selected'), and distinguishes it from siblings by emphasizing it's a simulation ('without executing') rather than an actual execution tool like 'run_acp_agent' or 'smart_route_request'.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Test routing without executing') and implies when not to use it (when actual execution is needed), with clear alternatives among siblings like 'run_acp_agent' for execution or 'smart_route_request' for actual routing.

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