Skip to main content
Glama

get_api_key_usage

Get per-API-key usage for a given key id: verification counts by type/channel/status, plus verification-request/confirmation/authorization totals, and attribution context (attribution_cutoff_at, attributed_fraction). Counts only — no recipient identifiers. Scoped to the authenticated account; an API-key caller may read only its own key.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), or sign in with start_login — a session opens this tool — then call this tool again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe API key id to fetch usage for
environmentNoScope metrics to test or production data (default: production)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers: it discloses the auth precondition, the access restriction to one's own key, the privacy guarantee ('Counts only — no recipient identifiers'), and the retry-after-login failure path. It does not cover error semantics for invalid/inactive key ids, but the safety and access profile is substantially disclosed.

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?

Two well-organized paragraphs: the first front-loads purpose, response contents, and restrictions; the second adds the access prerequisite with a concrete remedy. Every sentence earns its place, though the ACCESS guidance is slightly verbose.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter read tool with no output schema, the description enumerates the expected response fields well enough to compensate for the missing schema, and the auth requirement plus counts-only privacy note close the main usage gaps. Minor omissions — specific error behavior and exact failure mode of an unauthenticated call — are acceptable at this complexity.

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 both parameters (id, environment) are already documented in the schema; baseline 3 applies. The description adds only marginal context — it echoes 'key id' and implies that passing another account's key will fail given the own-keys-only scoping — but does not exceed what the schema provides.

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 and resource — 'Get per-API-key usage for a given key id' — and enumerates the exact response components (verification counts by type/channel/status, request/confirmation/authorization totals, attribution context). The 'per-API-key' framing plus the 'Counts only — no recipient identifiers' clarification distinguishes it from siblings like get_usage and get_self_api_key.

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

Usage Guidelines4/5

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

Provides clear context: scoped to the authenticated account, API-key callers may read only their own key, and a Proof account with authentication is required — including a concrete recovery path (start_login, then call again). It does not explicitly name alternatives or when-not-to-use conditions relative to get_usage, but the usage envelope is well defined.

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.