Skip to main content
Glama

ToolRoute

Route a task to the right tools (ToolRoute)

route_tools
Read-onlyIdempotent

Which of my tools does this task need? Send "set_id" (from register_tools) or "tools", plus "query" (the task). Returns a ranked shortlist (adaptive 3-12 tools, or "k"), confidence (high/medium/low/none), matched terms, token savings and the definitions ready to inject ("format": mcp, openai, anthropic, gemini or names). BM25 keyword ranking, no LLM. Free: 200 calls/day per IP, then $0.001 per call via x402 or credits.

Input Schema

NameRequiredDescriptionDefault
kNoFixed shortlist size (default adaptive)
max_kNoUpper bound for the adaptive size (default 12)
queryYesThe task or user request to route, e.g. "check if this wallet is sanctioned".
toolsNoTool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly).
formatNoDefinition format (default mcp; names = names only)
set_idNoset_id ("ts_..." from register, or a ToolFit pin).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: discloses the ranking algorithm (BM25, no LLM), the output shape (ranked shortlist, confidence tiers, matched terms, token savings), injectable definition formats, and concrete rate limits and pricing (200 calls/day per IP, then $0.001 via x402 or credits). That is exactly the cost/limit context annotations cannot carry.

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

Conciseness4/5

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

The core question and the input requirement are front-loaded, and every sentence carries information (inputs, outputs, algorithm, pricing). It is dense to the point of being run-on in the final sentence, but no content is filler.

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

Completeness5/5

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

There is no output schema, and the description compensates by describing the return payload (shortlist, confidence, matched terms, token savings, formatted definitions) and the confidence scale. Combined with the documented limits and the input precedence rule, an agent has everything needed to call this correctly.

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?

Schema coverage is already 100%, so this is about added meaning, and the description supplies it: set_id provenance from register_tools, the set_id-versus-tools precedence rule, adaptive 3-12 shortlist size with 'k' override, and the format enumeration's purpose. It adds real semantics beyond the schema's one-line defaults.

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?

Opens with a specific verb-and-resource question ('Which of my tools does this task need?') and clarifies it ranks/filters a tool set for a task. It names register_tools as the source of set_id, which cleanly separates it from the only sibling.

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

Usage Guidelines4/5

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

Gives an explicit input-level routing rule: send set_id if you have one, otherwise pass tools directly (registered on the fly). It states the task must go in 'query'. It stops short of saying when a task does NOT need routing or when to skip the tool in favour of manual selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources