Skip to main content
Glama

tokmeter_cache_efficiency

Read-only

Measure prompt-caching payoff by period, provider, or project: see cache hit rate, read/write volumes, per-model breakdown, and estimated savings, write premium, and net dollars.

Instructions

Prompt-caching payoff for today, the last 7 days or this month, optionally for one provider or project: cache hit rate, cache read and write volumes, and a per-model breakdown, plus ESTIMATED dollars — savings (cached reads assumed ~90% cheaper than input), the write premium (assumed ~25% over input) and the net. The estimates use the scope's average input price, not each model's card. Use it to judge whether caching pays off; for general token ratios across models, use tokmeter_efficiency.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tokmeter_cache_efficiency"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoTime period to analyze: today, week, or month
projectNoFilter by project name/path substring
providerNoFilter to a specific provider

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish read-only and closed-world behavior, so the description focuses on behavior the annotations do not cover: the dollar figures are explicitly estimates based on assumed ~90% cheaper cached reads and ~25% write premium, using the scope's average input price rather than each model's card. This is exactly the kind of caveat an agent needs to avoid over-trusting the output.

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?

The description is dense but front-loaded: it states the tool's purpose, outputs, estimation caveats, and alternative in a compact block. Every sentence contributes, though the single long opener could be split for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 responsibly enumerates returned metrics and explains the estimation methodology. It covers periods, optional filters, outputs, and the sibling alternative, leaving no important gap for an agent deciding whether and how to call it.

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 the schema already documents period, project, and provider parameters. The description restates their purpose at a high level ('today, the last 7 days or this month, optionally for one provider or project') but adds no syntax or filtering semantics beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies a precise resource (prompt-caching payoff) with concrete outputs: cache hit rate, read/write volumes, per-model breakdown, and estimated savings/write premium/net dollars. It explicitly distinguishes itself from the sibling tokmeter_efficiency by contrasting caching payoff with general token ratios.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states when to use it ('judge whether caching pays off') and names the alternative for a different question ('for general token ratios across models, use tokmeter_efficiency'). That gives an agent actionable routing guidance with no ambiguity.

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