Skip to main content
Glama

Revoke API key

revoke_key
Destructive

Revokes an API key so every agent and integration using it stops working immediately; this action is permanent, so create a new key instead.

Instructions

Revoke an API key: it stops working at once, for every agent or integration using it. Cannot be undone (create a new key instead). Revoking an already revoked key changes nothing. A test key can revoke only test keys. Requires confirm: true.

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": {
      "key_id": "<key_id>"
    },
    "name": "revoke_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
key_idYesAPI key id (UUID) from list_keys or create_key
confirmNoMust be true (not needed for dry_run); set it only when the user asked to revoke this key
dry_runNotrue: validate and show what would happen without changing anything
idempotency_keyNoAny unique string; retrying with the same key and arguments within 24 h returns the first answer instead of doing it twice

Output Schema

NameRequiredDescriptionDefault
dataNo
resultYes
statusNo
changesNo
dry_runNo
messageNo
error_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only supply destructiveHint=true; the description adds substantially more: immediate effect on all consumers, irreversibility, idempotent behavior on an already-revoked key, and a privilege boundary ('A test key can revoke only test keys'). These are exactly the facts an agent needs before committing to a destructive call.

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?

Four short sentences, front-loaded with the irreversible consequence before the mechanics. Every sentence carries distinct information (effect, irreversibility, idempotency, scope restriction), though the confirm requirement at the end reads as a tacked-on restatement.

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?

Output schema exists, so return values need no explanation, and the description covers the destructive semantics, scope restriction, idempotency, and required confirmation. Nothing material for a correct call is missing given the fully documented schema.

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?

Schema description coverage is 100%, so the schema already documents key_id, confirm, dry_run, and idempotency_key thoroughly. The description's 'Requires confirm: true' restates the schema constraint rather than adding new meaning, so the baseline of 3 applies.

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 names the replacement path ('create a new key instead'), which implicitly routes the agent away from create_key. The scope statement ('for every agent or integration using it') makes the blast radius unambiguous.

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?

Gives clear when-to-use signal plus the alternative action (create a new key instead of revoking) and the precondition 'Requires confirm: true'. It does not explicitly mention the dry_run validation path as a recommended first step, which is the one guidance gap.

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