Skip to main content
Glama

api-key-usage

Retrieve API key usage statistics by hash to track request counts and monitor credit consumption, identifying high-usage keys.

Instructions

Get usage statistics for a specific API key by its hash, including request counts and credit consumption. Use this to monitor per-key usage or identify which key is consuming the most credits. Read-only, no side effects. Requires scope: settings:read. Use api-key-list to find key hashes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesAPI key hash
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses safety profile ('Read-only, no side effects') and authorization requirements ('Requires scope: settings:read'). Lacks error behavior (e.g., invalid hash) or rate limit disclosure, but covers critical safety/auth context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, zero waste. Front-loaded with action ('Get usage statistics...'), followed by use case, safety profile, and prerequisites. Each sentence serves a distinct purpose with no redundancy.

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 simple read tool with 1 parameter, 100% schema coverage, and no output schema, the description is complete. It covers prerequisites (how to get hash), authorization scope, safety profile, and hints at return content ('request counts and credit consumption').

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% (1 param with description), baseline 3. Description adds value by explaining where to source the parameter ('Use api-key-list to find key hashes'), providing crucial context for an opaque identifier.

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?

Excellent specific verb ('Get') + resource ('usage statistics for a specific API key') + scope ('by its hash'). Clearly distinguishes from siblings like api-key-list (which finds keys) and api-key-create/rotate (which mutate). Mentions specific metrics returned (request counts, credit consumption).

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 when-to-use ('monitor per-key usage or identify which key is consuming the most credits') and explicit alternative/prerequisite named ('Use api-key-list to find key hashes'), guiding the agent to first obtain the hash parameter before calling this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ebenezer-isaac/llmconveyors-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server