Skip to main content
Glama

Price a workload across models

calculate_model_arbitrage
Read-onlyIdempotent

No API key needed; only model is required (e.g. {"model": "gpt-6.1-sol"}, defaults 2,000 tokens in and 400 out). Price a workload at list prices across models: cost per request and per month for the requested model, its cheaper sibling, and the effect of prompt caching. The result names the pricing table version it used.

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": {
      "model": "<model>"
    },
    "name": "calculate_model_arbitrage"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesmodel id, e.g. gpt-6.1-sol or claude-sonnet-5-5
compare_toNo
input_tokensNoper request; default 2000
output_tokensNoper request; default 400
static_tokensNoportion of input_tokens that is a fixed prefix (system + tools)
requests_per_monthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / input_tokens / description
      Added value: +"per request; default 2000"
    • addedInput schema / properties / model / description
      Added value: +"model id, e.g. gpt-6.1-sol or claude-sonnet-5-5"
    • addedInput schema / properties / output_tokens / description
      Added value: +"per request; default 400"
    • changedInput schema / required
      Previous value: -[
      -  "model",
      -  "input_tokens",
      -  "output_tokens"
      -]New value: +[
      +  "model"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare the tool is read-only, idempotent, non-destructive, and closed-world, so the description's added context is useful: no API key is needed, only `model` is required, token defaults are stated, and the response names the pricing table version. It does not add rate limits or other operational caveats, but with annotations covering safety this is solid.

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?

The description is three tight sentences with no wasted words, front-loading the key invocation facts and then stating the calculation and output provenance. Every sentence contributes useful information.

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 six-parameter pricing tool with no output schema, the description gives a useful output summary and mentions the pricing table version, while annotations cover safety. Still, it leaves the optional comparison and monthly-volume parameters underexplained, so an agent lacks full guidance for advanced use.

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 67%, and the description reinforces the required `model` parameter and default token sizes already documented in the schema. However, it does not explain important optional parameters such as `compare_to`, `requests_per_month`, or how `static_tokens` relates to prompt caching beyond the schema's brief note.

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?

The description states a specific verb and resource: pricing a workload at list prices across models, including per-request and per-month costs, a cheaper sibling, and caching effects. It is clearly distinct from sibling tools like audit_repo_token_waste and optimize_prompt_payload, but it does not explicitly name or differentiate against those alternatives.

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 description implies usage by explaining that only `model` is required and that it prices workloads across models, but it gives no explicit when-to-use guidance, exclusions, or alternatives. An agent must infer the right context from the stated purpose.

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.