Skip to main content
Glama

route

Selects the cheapest reachable free or paid LLM for a given prompt, returning the chosen model, cost estimates, fallback chain, and reasoning.

Instructions

Given a prompt, route it to the cheapest reachable free/cheap LLM. Returns the chosen model, estimated cost (USD + CNY), a fallback chain, and reasoning. Reuses Free & Cheap Tokens model channels (Kimi K2.6, Qwen, DeepSeek, Cloudflare Workers AI, Groq, Gemini, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe task prompt to route. Token estimate is derived from it.
regionNoCN = mainland-accessible without VPN.global
priorityNoRouting objective.cost
include_paidNoAllow paid models as fallback when no free model fits.
max_output_tokensNoExpected output tokens for cost estimation.
required_capabilitiesNoCapabilities the model must support, e.g. ["chinese","reasoning"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
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 adds real value by disclosing the return payload (chosen model, USD+CNY cost estimate, fallback chain, reasoning) and the underlying channel pool, but it never resolves whether the tool actually dispatches the prompt or only returns a routing recommendation, and says nothing about auth or rate limits.

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?

Two sentences, front-loaded with the action and followed by the payoff and source pool. The trailing channel list is slightly decorative but does convey scope; nothing is bloated.

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?

With six parameters, no output schema, and no annotations, the description does the important extra work of naming the return fields and cost units. The remaining gap is the execute-vs-recommend ambiguity, which an agent needs in order to use the result correctly.

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 100% and the schema already explains region, priority, include_paid, max_output_tokens, and required_capabilities with defaults and enums. The description adds no parameter-level detail beyond 'prompt', so the baseline 3 applies.

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?

States a specific verb and resource: 'route [a prompt] to the cheapest reachable free/cheap LLM', and enumerates what comes back (model, cost, fallback chain, reasoning). This is clearly distinguishable from cost_compare and list_models on intent, though it never names a sibling to sharpen the boundary.

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

Usage Guidelines3/5

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

Usage context is implied rather than stated: an agent can infer 'use me when you want a cheap model selected for a prompt', and the sample model channels suggest scope. There is no explicit when-not condition and no mention of cache_route or cost_compare as alternatives for similar needs.

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

Deploy Server

Other Tools