Skip to main content
Glama

Intelligent Routed Chat

chat_routed

Routes chat prompts to a suitable AI model by analyzing prompt size, required context, and task category. Automatically balances cost and quality according to your priorities.

Instructions

Execute a chat completion with intelligent, automatic cost-aware model routing based on prompt size, required context length, and task attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe main prompt to run
max_tokensNoMaximum tokens to generate
strictnessNoRouting prioritization strategy. 'cost' prefers the absolute cheapest; 'quality' weights model performance tiers.cost
temperatureNoSampling temperature (0-2)
system_promptNoOptional system prompt
task_categoryNoThe general category of the task
require_visionNoWhether the model must support image/vision inputs
max_usd_price_per_1m_promptNoStrict maximum cost in USD per 1M prompt tokens (e.g., 2.50)
Behavior3/5

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

With only openWorldHint annotation, the description adds some context about routing behavior but does not disclose potential side effects, failure modes (e.g., no model fitting budget), latency, or external calls. It does not contradict the annotation.

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, well-structured sentence that front-loads the core purpose and key differentiator. No wasted words.

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?

The tool has 8 parameters and no output schema, so the description should clarify return behavior and edge cases. It explains the routing intent but lacks details on response format, failure conditions, or how strictness and price limits interact.

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?

The input schema has 100% parameter coverage, so the description does not need to explain individual parameters. It adds high-level context (routing based on prompt size etc.) that maps to parameters but does not go beyond the schema's own descriptions.

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 executes a chat completion with a distinguishing feature: intelligent, automatic cost-aware model routing based on prompt size, context length, and task attributes. This differentiates it from sibling tools like chat_completion or recommend_model.

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?

The description implies usage for cost-aware routing needs, but does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or prerequisites. The context is implicit, not explicit.

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

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/villagertim/universal-mcp-for-openrouter'

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