Skip to main content
Glama

compare_models_for_task

Rank LLMs by expected cost per successful task from token counts and success rates, so cheap but unreliable models do not rank above reliable ones.

Instructions

Rank models for a task by expected cost per successful task.

Cost per token is the wrong ranking for agent work: a cheap model that fails half its tasks costs more per success than a pricier, reliable one. Pass measured success rates (0-1 per model_id) if you have them; models without a supplied rate are ranked on raw cost.

Args: input_tokens: Input tokens for one attempt at the task. output_tokens: Output tokens for one attempt at the task. success_rates: Optional map of model_id to success rate in (0, 1].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_tokensYes
output_tokensYes
success_ratesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 behavioral burden. It discloses ranking methodology and fallback behavior for missing success rates, which is useful, but says nothing about output format, prerequisites, or what models are ranked.

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?

Front-loads purpose in the first sentence, then rationale, then an Args list that fills schema gaps. No filler; every sentence adds either justification or parameter semantics.

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?

No output schema and no annotations, so the description should help interpret returns. It fully covers parameters and purpose, but does not describe the ranking output format or edge cases, leaving a clear gap for a tool whose result is a ranked list.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by documenting all three parameters: input/output tokens as 'for one attempt at the task' and success_rates as an optional model_id-to-rate map in (0,1]. This adds substantial meaning beyond the bare schema types.

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 'Rank' and resource 'models for a task' with a precise metric: 'expected cost per successful task'. It contrasts with cost-per-token ranking, but does not explicitly name or differentiate from sibling tools like estimate_run_cost or price_usage.

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?

Provides context for when to supply success_rates and how missing rates are treated (ranked on raw cost), but never states when to choose this tool over sibling cost tools or when not to use it. Usage is implied by the purpose rather than explicitly guided.

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