Skip to main content
Glama

get_api_key_usage

Read-only

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). The counts cover the key and every key it replaced (api_key.replaced_key_ids). 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.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses that counts only are returned with no recipient identifiers, that counts aggregate the key plus every key it replaced (api_key.replaced_key_ids), and it spells out the authentication path (Proof account, /mcp auth or start_login). This is exactly the extra behavioral context annotations cannot carry.

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 short paragraphs, front-loaded with what gets returned, followed by an access note. Nearly every sentence earns its place; the access paragraph is slightly verbose but justified for an auth-gated tool.

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 correctly carries the burden of describing return contents (count categories plus attribution_cutoff_at and attributed_fraction) and the auth requirement. An agent has everything needed to call it correctly.

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 baseline is 3, but the description adds real semantic meaning for id: the counts cover the key and every key it replaced, clarifying that id aggregates a key lineage. It does not add anything about the environment parameter beyond the schema's own default note.

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 names a specific verb and resource (per-API-key usage for a given key id) and enumerates the exact metric families returned: verification counts by type/channel/status plus request/confirmation/authorization totals. It is clearly distinguishable from siblings like get_usage, get_self_api_key, and list_api_keys, which cover different scopes.

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?

It states the operative constraint clearly: 'an API-key caller may read only its own key' and that usage is scoped to the authenticated account, which tells the agent when this tool is applicable. However, it never explicitly contrasts this with get_usage or get_self_api_key, leaving the agent to infer the choice among overlapping usage tools.

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.