Skip to main content
Glama

compare_llm_models

Compare two LLM models side-by-side to weigh token costs, prompt caching savings, and context limits before choosing a model.

Instructions

Compare two LLM models side-by-side on token cost, prompt caching savings, and context limits.

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": {
      "modelA": "<modelA>",
      "modelB": "<modelB>"
    },
    "name": "compare_llm_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelAYesFirst model ID (e.g. claude-4-5-sonnet)
modelBYesSecond model ID (e.g. gpt-5)
inputTokensNo
outputTokensNo
cacheHitRatioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the burden; it does disclose the comparison dimensions, which gives useful context about what the output covers. However, it never says the result is an estimate based on assumed token volumes, nor that it is a read-only computation with no side effects — reasonable inferences but not stated.

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 tight sentence with the resource and the comparison axes front-loaded; nothing extraneous.

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?

For a five-parameter tool with no annotations and no output schema, the definition covers the core intent but leaves the three optional parameters and the nature of the returned comparison (format, assumptions) unexplained. Adequate to select the tool, thin for invoking it correctly.

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

Parameters2/5

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

Schema coverage is only 40%: modelA and modelB have descriptions with examples, but inputTokens, outputTokens, and cacheHitRatio are undocumented beyond bare defaults. The description does not explain that these optional parameters are the assumptions driving the cost and caching-savings estimates, which is exactly the meaning an agent needs in order to tune them.

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?

Names a specific verb (compare) and resource (two LLM models) and enumerates the axes compared: token cost, prompt caching savings, context limits. That distinguishes it from list_llm_models and calculate_llm_cost reasonably well, though it never explicitly contrasts itself with the cost calculator sibling.

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 verb and the 'side-by-side' framing imply when to reach for it, but there is no explicit when-to-use/when-not statement, no mention of when calculate_llm_cost is preferable, and no prerequisites noted.

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