Skip to main content
Glama

Compare models

compare_models
Read-onlyIdempotent

Compare several models side by side at a given volume: cost per request and per month, prices, context window, output limit, release date and knowledge cutoff, from AI Gateway's live catalog. Pass ids like 'openai/gpt-4.1-mini', or a provider name ('anthropic', 'openai', 'google') for its newest models, so you don't need to know which models are current.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "models": "<models>",
      "input_tokens": "<input_tokens>",
      "output_tokens": "<output_tokens>",
      "requests_per_day": "<requests_per_day>"
    },
    "name": "compare_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelsYesModel ids like 'openai/gpt-4.1-mini', or provider names like 'anthropic' for that provider's newest models
cached_shareNoShare of input tokens served from the prompt cache, 0 to 1
input_tokensYesInput tokens per request: system prompt, retrieved documents, history and the user's message
output_tokensYesOutput tokens per request: the length of a typical reply
requests_per_dayYesExpected requests per day, for the monthly cost

Output Schema

NameRequiredDescriptionDefault
modelsYes
unknownYes
live_catalogYes
requests_per_dayYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / input_tokens / description
      Added value: +"Input tokens per request: system prompt, retrieved documents, history and the user's message"
    • addedInput schema / properties / output_tokens / description
      Added value: +"Output tokens per request: the length of a typical reply"
    • addedInput schema / properties / requests_per_day / description
      Added value: +"Expected requests per day, for the monthly cost"
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive and open-world, so the safety profile is settled. The description adds real context beyond that: the data comes from a live AI Gateway catalog, and provider names resolve to the newest models, which signals the result depends on external state. It does not say what happens for an unknown id (error vs. omission) or any lookup 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 comparison outputs before the input convention. Dense but every clause carries information; only the model-id example is redundant with the schema.

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?

An output schema exists, so return-shape explanation is optional, and all parameters are documented downstream. The one meaningful gap for an open-world, live-catalog tool is behavior on unknown model ids or providers, which an agent would want to know before calling.

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 every parameter is already documented. The description restates the models parameter almost verbatim ('Pass ids like openai/gpt-4.1-mini') and adds nothing about cached_share or the 12-item cap, so the baseline 3 is right.

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 ('compare several models side by side') and enumerates the exact comparison axes returned: cost per request/month, prices, context window, output limit, release date, knowledge cutoff. An agent knows precisely what comes back. It does not, however, distinguish itself from overlapping siblings such as estimate_cost or price_ai_feature, which also deal with model pricing.

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?

'at a given volume' plus the explicit requirement for input_tokens/output_tokens/requests_per_day makes the preconditions of a meaningful comparison clear, and the provider-name tip ('so you don't need to know which models are current') tells the agent how to proceed without a catalog lookup. No explicit when-not or named alternative tool, which keeps it short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources