Skip to main content
Glama

Revoke an API key

revoke_api_key
Destructive

IRREVERSIBLE: Revoke an API key

Revokes one of your API keys: it stops working at once but stays in list_api_keys, marked as revoked. Use delete_api_key instead to remove it from the list for good. A revoked key cannot be turned on again; a new key is made in the developer portal. Only keys made in the developer portal or with POST /developer/api-keys are revoked here; the access of a connected AI app ends with disconnect_ai_app. id comes from list_api_keys. 404 when no such key of yours exists.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "revoke_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesid
confirmNoLeave out on the first call. EchoCall then answers with a confirmation value. Ask the user for a clear yes, then repeat the call with the same arguments and this value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes further: the key stops working immediately yet persists in listings, revocation is irreversible, re-enabling is impossible, and a replacement must be minted elsewhere. It also documents the 404 outcome for a nonexistent/foreign key, which the annotations cannot express.

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?

Front-loaded with the irreversible warning, then scope, then alternatives, then parameter provenance and failure mode -- a sensible priority order. Slightly dense with backticked identifiers and a minor redundancy repeating the title, but every sentence carries information.

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 two-parameter destructive tool with no output schema, the definition covers reversibility, persistence semantics, alternatives, id sourcing, and the 404 case. Nothing an agent needs in order to call it safely is missing.

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% and the confirm two-step flow is already fully documented in the schema, so the baseline is 3. The description adds genuine value beyond the schema by stating where `id` comes from (list_api_keys) and what a missing id produces (404).

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?

States a specific verb and resource ('Revoke an API key') and immediately disambiguates the outcome from its nearest sibling ('stays in list_api_keys, marked as revoked. Use delete_api_key instead to remove it from the list for good'). An agent can distinguish revoke, delete, list, and disconnect without inspecting other schemas.

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 routing rules: use delete_api_key to remove permanently, use disconnect_ai_app to end a connected app's access, and only keys from the developer portal or POST /developer/api-keys apply. It also names `id`'s source and the 404 condition, leaving nothing to inference.

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.