Skip to main content
Glama

recommend_model

Selects the cheapest model from a provider-locked ladder that can handle a user message, using complexity classification to reduce costs in multi-step workflows.

Instructions

Given a ladder of models (cheap → flagship) and a user message, return the cheapest model on the ladder that can plausibly handle it, plus reasoning. The ladder should be brand-locked (all-Anthropic, all-OpenAI, etc.) to honor your user's BYOK provider.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ladderYesOrdered model ids, index 0 = cheapest. Example: ['openai/gpt-5.4-mini', 'openai/gpt-5.4', 'openai/gpt-5.5']
userMessageYesThe user's request.
recentHistoryNoOptional context. Last 1-2 assistant turns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/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 burden of explaining behavior. It states the tool returns a recommendation plus reasoning and enforces a brand-locked ladder, but it does not disclose what happens when no model is suitable, how 'plausibly' is determined, or whether the tool actually invokes any external model.

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?

Two sentences, no filler. The primary behavior is front-loaded in the first sentence, and the BYOK constraint earns its place in the second sentence.

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 no output schema, the description appropriately explains the expected return: cheapest model plus reasoning. It could be more explicit about edge cases, such as an incapable ladder or how 'recentHistory' should influence the selection, but the core invocation context is covered.

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%, so the baseline is 3. The description adds useful context about ladder ordering and brand-locking, but it does not materially expand on the meaning of 'userMessage' or 'recentHistory' beyond what the schema already provides.

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 uses a specific verb ('return') and resource ('the cheapest model on the ladder') and clearly defines the task: select the cheapest plausible model for a user message and provide reasoning. It is easy to distinguish from the sibling 'classify_turn' because the purpose centers on model selection, not classification.

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?

The description gives clear context for when to use the tool: when a model ladder and a user message are available, and when BYOK provider constraints apply. It does not explicitly contrast with 'classify_turn' or state when not to use it, but the usage context is unambiguous enough.

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