Skip to main content
Glama

Core: Get usage

metrecept_get_usage

Reads a tenant's live lifetime usage meters—requests, tokens, cache ratio, web fetches, API calls, billed USD—with plan and billing status, to check how much you've used.

Instructions

Read the tenant's live lifetime usage meters: requests, cache hit/miss tokens and ratio, web fetches, API calls, billed USD per meter and total, today's UTC-day values, plan, billing status and whether the soft web-fetch cap is lifted. Use it for 'how much have I used / what plan am I on'. Not for per-day trends: use metrecept_get_usage_history. Not for money saved: use metrecept_get_savings. Not for one run's signed record: use metrecept_get_session_receipt. 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?

No annotations are provided, so the description carries the full burden — and it does: read-only, not billed, never cached, tenant-scoped by key, and a bad/missing key yields the gateway's 401 JSON error. It also names the auth mechanisms for both stdio (METRECEPT_API_KEY) and remote HTTP (Authorization: Bearer).

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 the core action, then exclusions, then behavioral caveats — a sensible ordering. The meter enumeration in the first sentence is long, but each clause maps to a real returned value, so little is wasted.

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?

For a zero-param read tool with an output schema, the description covers everything the schema cannot: auth requirements, error behavior, caching and billing semantics, and tenant scoping. No return-value explanation is needed given the output schema exists.

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, so the baseline is 4; there is nothing for the description to disambiguate. It correctly implies the tenant and key are implicit context rather than call arguments.

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?

Opens with a specific verb and resource ('Read the tenant's live lifetime usage meters') and enumerates exactly which meters are returned (requests, cache tokens/ratio, web fetches, API calls, billed USD, plan, billing status, soft cap). An agent can distinguish it from metrecept_get_usage_history or metrecept_get_savings without opening any 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?

Gives both a positive trigger ('how much have I used / what plan am I on') and three explicit exclusions, each paired with the sibling to use instead (history for per-day trends, savings for money saved, session_receipt for a single run). Nothing is left to inference.

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