Skip to main content
Glama

Generate cheapest-first routing

modelfinder_generate_routing
Read-onlyIdempotent

Generate a cheapest-first routing.json with guards and a personal-data policy, plus a LiteLLM proxy config, from a results.json evaluation. Returns both without writing or deploying.

Instructions

Turn a results.json object into a cheapest-first routing.json (with guards and a personal-data policy) and a LiteLLM proxy config. Returns both; nothing is written or deployed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoExplicit model order (candidate ids), overriding cost order.
guardsNoChecks applied to every production reply; a failure escalates to the next model.
resultsYesThe full results.json object written by eval_models.py.
pii_policyNoblock: never send prompts with personal data or secrets; warn: send and report; off: no check.warn
response_formatNomarkdown (default) for a readable summary, json for the full machine-readable result.markdown
include_unknown_costNoAppend passing models whose price is unknown.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
notesYes
routing_jsonYes
litellm_config_yamlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.5

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the bar is lower; the description still adds real value by stating the outputs are returned and 'nothing is written or deployed,' which closes the loop on side effects. It does not cover failure modes for invalid guard specs or oversized input.

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?

A single sentence that front-loads the core transformation, then names both artifacts and the no-side-effect guarantee. No filler, nothing repeated from the name.

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 an output schema present, return values need not be explained, and the description confirms both artifacts are returned alongside a clear side-effect statement. The only gap is workflow context: when in the eval-to-routing pipeline it should be invoked relative to rank_eval_results or modelfinder_validate_eval_config.

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 every parameter, including guards, pii_policy, and response_format enums, is documented in the schema itself. The description only alludes to guards and the personal-data policy, so it adds almost nothing beyond structured data; baseline 3 is appropriate.

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-artifact transformation: results.json becomes a cheapest-first routing.json plus a LiteLLM proxy config. That is clearly distinct from sibling tools like rank_eval_results or create_eval_config, though it never names those alternatives to sharpen the distinction.

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 mention of results.json 'written by eval_models.py' implies the tool is used downstream of evaluation, but there is no explicit when-to-use statement, no prerequisites, and no routing to a sibling when the caller only wants ranking or config validation.

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