Skip to main content
Glama

revoke_api_key

DestructiveIdempotent

Revoke an API key by ID to stop its authentication. The action is irreversible; if it's the last active key, create a replacement first.

Instructions

Revoke one API key by id (find ids with list_api_keys). The key stops authenticating and the revocation cannot be undone from this tool. Guardrails: an unknown key_id fails with api_key_not_found, and revoking the organization's last active key is refused with cannot_revoke_last_key — create a replacement with create_api_key first. Returns key_id with revoked: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_idYesAPI key id from list_api_keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.3
    • addedInput schema / properties / key_id / description
      Added value: +"API key id from list_api_keys."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint, idempotentHint), the description adds critical behavioral context: the key stops authenticating, revocation cannot be undone, unknown ids fail with api_key_not_found, and the last active key is protected via cannot_revoke_last_key. It also states the return shape (key_id with revoked: true), which is valuable since there is no output schema.

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 consequence, the guardrails, and the return value. Information is front-loaded with the purpose and id source, and the guardrail details are compactly folded into a single sentence. No filler or 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?

Despite lacking an output schema, the description fully specifies the return value)Skip, common failure modes, the ordering dependency on list_api_keys, and the remediation path via create_api_key. An agent has everything needed to call this tool correctly in both success and failure scenarios.

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?

The schema already covers 100% of the parameter meaning ('API key id from list_api_keys'). The description repeats this guidance with '(find ids with list_api_keys)' and adds error behavior for unknown ids, but it does not enrich the parameter semantics beyond what the schema provides. Baseline 3 is appropriate.

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 'Revoke one API key by id', a specific verb and resource, and immediately distinguishes itself from list_api_keys and create_api_key by explaining the id source and the guardrail for creating a replacement. The tool's purpose is unambiguous and clearly differentiated from sibling tools.

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?

It explicitly tells the agent how to find ids ('find ids with list_api_keys') and provides a clear alternative path for a specific error case ('create a replacement with create_api_key first'). The guardrails describe when the tool will fail and how to respond, leaving no ambiguity about when to invoke it.

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

Deploy Server

Other Tools