Skip to main content
Glama

Core: Get savings

metrecept_get_savings

Read your tenant's cumulative savings ledger to see cache hit ratio, tokens saved, estimated avoided upstream spend, billed amounts, net savings, and ROI.

Instructions

Read the tenant's cumulative savings ledger: cache hit ratio and hit tokens, estimated upstream spend avoided by cache replays, what Metrecept billed for hits and misses, net saving and ROI. Use it for the money view. Not for raw meters or plan: use metrecept_get_usage; for per-day meters use metrecept_get_usage_history. To share these numbers publicly use metrecept_publish_savings_receipt. Avoided-spend figures are list-price estimates (the response carries a disclaimer); billed figures are exact. Read-only, not billed, never cached. A bad or missing key returns the gateway's 401 JSON error. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.4

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so: read-only, not billed, never cached, 401 JSON on bad/missing key, tenant scoping tied to the API key, and a critical data-trust caveat that avoided-spend figures are list-price estimates while billed figures are exact. That estimate-vs-exact distinction is exactly the kind of context an agent cannot infer from structured fields.

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?

Front-loaded with what the ledger contains, then routing, then caveats, then auth — a sensible order. Every sentence carries information, though the auth sentence is dense and repeats the key concept twice (env var and Bearer), which could be tightened slightly.

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?

An output schema exists, so return values needn't be spelled out, yet the description still names the headline figures the agent will see. Combined with auth requirements, error behavior, caching/billing semantics, and data-precision caveats, nothing an agent needs to call this correctly is missing.

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?

The tool takes zero parameters, which sets a baseline of 4; there is nothing to document. The description goes slightly beyond by explaining the implicit inputs — the API key (METRECEPT_API_KEY on stdio, Bearer on HTTP) and the tenant scoping it determines — which is genuinely useful given no explicit params exist.

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?

States a specific verb (Read) and resource (tenant's cumulative savings ledger) and enumerates the exact fields returned: cache hit ratio, hit tokens, avoided spend, billed amounts, net saving, ROI. It also positions the tool relative to siblings (money view vs. raw meters vs. per-day meters vs. public receipt), so the agent can pick it without opening a schema.

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?

Explicit positive routing ("Use it for the money view") and explicit negative routing with named alternatives: metrecept_get_usage for raw meters/plan, metrecept_get_usage_history for per-day meters, metrecept_publish_savings_receipt for public sharing. Both when-to-use and when-not-to-use are covered.

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