Skip to main content
Glama

cache_batch_savings

Read-only

What prompt caching and batch / flex save on one model: monthly input and output tokens priced at every listed seller plain, with the given share of input read from the cache (the seller's own cache-read price) and, if can_wait, the seller's batch / flex offers. USD, cheapest first; cache write fees are not counted. Each row has card_url and cite.

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": "cache_batch_savings"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesmodel id, e.g. anthropic/claude-sonnet-5-5
can_waitNoinclude batch / flex offers (results later, not real-time)
cache_pctNopercent of input tokens read from the prompt cache, default 50
input_tokensNoinput tokens a month, default 100000000
output_tokensNooutput tokens a month, default 10000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description does add real context beyond that — USD currency, cheapest-first ordering, that cache write fees are excluded, that cache reads use the seller's own cache-read price, and that each row carries card_url and cite. It stops short of explaining what magnitude/value fields come back or how savings are computed against a baseline.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is compact and front-loaded with the purpose, and every clause carries information. However, the construction is a single dense sentence with awkward phrasing such as 'priced at every listed seller plain,' which takes effort to parse and buries the practical output notes (cheapest first, cache write fees excluded) mid-sentence.

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?

With no output schema, the description must carry the return shape, and it only partially does: rows are said to include card_url and cite and to be cheapest-first, but the actual savings/price fields are unspecified. For a 5-parameter analytical tool this is workable but leaves the agent guessing at what the numbers represent.

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

Parameters4/5

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

Schema coverage is 100%, so defaults and ranges are already documented and the baseline is 3. The description goes one step further by explaining the meaning of cache_pct (share of input priced at the seller's own cache-read rate) and the conditional effect of can_wait (batch/flex offers appear only when true), which is genuine semantic content beyond the schema text.

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 computation on a specific resource: monthly input/output tokens for one model, priced across all listed sellers, with cache-share and optional batch/flex applied. 'On one model' plus the caching/batch framing distinguishes it reasonably well from siblings like cheapest_offers or estimate_cost, though it never names an alternative directly.

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?

Usage is only implied: the mention of 'one model' and 'if can_wait' hints at the single-model, cache/batch scenario, but there is no explicit when-to-use or when-not-to-use statement and no routing to estimate_cost or compare_models. An agent must infer the boundary itself.

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