Skip to main content
Glama

list_api_keys

Read-onlyIdempotent

List every API key in a project with its scope, last-used time, and client surface to audit access and find the prefix needed to revoke a key.

Instructions

Requires an API key with the admin scope or higher. List all API keys in the project. Never returns plaintext key values — only the non-secret prefix, which is enough to identify a key for revoke_api_key. Each key includes last_used_at and last_used_surface (which client — "mcp", "terraform", or "api" — most recently authenticated with it), both absent if the key has never been used, plus scope ("read", "write" or "admin" — what the key is permitted to do) and created_by_key_id (which key minted it, absent for a key made in the dashboard; revoking a key also revokes every key below it in that chain). last_used_surface is best-effort client self-identification from a caller-controlled, spoofable User-Agent header: useful for answering "did my client ever successfully authenticate?", never a basis for trust or authorization decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive, and closed-world behavior; the description goes well beyond them by disclosing that plaintext key values are never returned, when fields are absent, that last_used_surface is spoofable, and that chain revocation follows created_by_key_id. No contradiction exists.

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?

Every sentence contributes operational or security-critical detail, and the key limitations (no plaintext, spoofable surface) are stated explicitly. Despite density, the content is organized and free of filler.

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?

Since there is no output schema, the description carries the burden of documenting return behavior; it covers all key fields, absence conditions, and the security caveat. An agent can safely call and interpret results without additional lookup.

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?

With zero parameters, the schema fully covers input semantics, so the baseline of 4 applies. The description appropriately invests in output semantics instead of parameter detail.

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 states a specific verb and resource — "List all API keys in the project" — and clarifies the non-secret prefix's role for revoke_api_key. This clearly distinguishes it from create/revoke key siblings and leaves no ambiguity about what operation is performed.

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 provides the prerequisite (admin scope or higher) and explicitly connects its output to revoke_api_key for key identification. It does not explicitly discuss when not to use it, but the listing purpose and related key-lifecycle siblings give clear context.

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