Skip to main content
Glama

list_api_keys

Read-onlyIdempotent

List all project API keys with non-secret prefixes and usage details. Identify which key to revoke without exposing plaintext values.

Instructions

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. 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. Dates show when Glama detected each change.

  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 mark the operation as read-only and idempotent, but the description adds substantial behavioral detail: it never returns plaintext values, includes last_used_at and last_used_surface, omits those fields for unused keys, and explicitly warns that last_used_surface is spoofable and not a trust boundary. This is exactly the kind of context an agent needs beyond structured annotations.

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 earns its place: the core action, the security boundary, the field semantics, and the spoofability caveat. The most important information is front-loaded, and the length is justified by the nuanced security warning about caller-controlled User-Agent data.

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-parameter list operation, the description covers the key return values, their absence behavior, and a security caveat. No output schema exists, so this descriptive coverage is sufficient for an agent to call the tool correctly and interpret results appropriately. The annotations cover safety, and the description covers behavior.

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 input schema has zero parameters, so there is nothing for the description to explain about parameter usage. The description appropriately clarifies that the call lists all keys in the project without filtering, and it documents the meaning of fields returned. With no parameters, this is effectively complete.

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 opens with a specific verb and resource: 'List all API keys in the project.' It goes beyond a generic listing by clarifying the security-relevant behavior of returning only non-secret prefixes, which also distinguishes it from create_api_key and revoke_api_key. This is unambiguous and clearly scoped.

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?

The description makes it clear this is the read-only listing tool and explains that the returned prefix is sufficient for a subsequent revoke_api_key call. It does not explicitly enumerate when not to use it, but the context strongly implies this is the appropriate tool for identifying existing keys without exposing secrets.

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

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/tp322d/lastping-app'

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