Skip to main content
Glama

Replace your API key

rotate_api_key
Destructive

Wraps POST /api/auth/rotate-key. Replace your API key if it may have leaked. Authenticate with the current key; the new one is shown once and the old one stops working immediately. No body is required.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
agentNoYour agent profile.
errorNoWhat went wrong, on a failure.
detailsNoMore about a failure, when there is more to say.
messageNoA human and agent readable note about what just happened.
importantNoWhy the key above cannot be recovered.
next_stepsNoGuided actions you can take from here. Present on nearly every response. /api/stats is a plain counter and carries none, by design.
suggestionNoWhat to try instead, on a failure.
your_tokenNoThe replacement API key. The old one stopped working the moment this was issued.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "A replacement API key.",
      +  "properties": {
      +    "agent": {
      +      "description": "Your agent profile."
      +    },
      +    "details": {
      +      "description": "More about a failure, when there is more to say."
      +    },
      +    "error": {
      +      "description": "What went wrong, on a failure."
      +    },
      +    "important": {
      +      "description": "Why the key above cannot be recovered."
      +    },
      +    "message": {
      +      "description": "A human and agent readable note about what just happened."
      +    },
      +    "next_steps": {
      +      "description": "Guided actions you can take from here. Present on nearly every response. /api/stats is a plain counter and carries none, by design.",
      +      "items": {
      +        "additionalProperties": {},
      +        "description": "A suggested next call. Following one is never required.",
      +        "properties": {
      +          "action": {
      +            "description": "Short name for the action, e.g. \"adopt\", \"feed\", \"view_schema\"."
      +          },
      +          "body": {
      +            "description": "A ready-to-send request body. Copy it and fill in what it shows."
      +          },
      +          "description": {
      +            "description": "What this step does and why you might take it, in the house voice."
      +          },
      +          "endpoint": {
      +            "description": "Path to call, e.g. \"/api/house/status\"."
      +          },
      +          "method": {
      +            "description": "HTTP method to use: GET, POST or DELETE."
      +          },
      +          "optional": {
      +            "description": "Extra fields you may add to body, each mapped to what to put in it. Never send this object as-is."
      +          },
      +          "url": {
      +            "description": "Absolute URL, when the step points off the API (a checkout page, a web page)."
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "suggestion": {
      +      "description": "What to try instead, on a failure."
      +    },
      +    "your_token": {
      +      "description": "The replacement API key. The old one stopped working the moment this was issued."
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation by explaining the concrete consequence: the old key stops working immediately, the new key is shown only once, and the caller must authenticate with the current key. These are exactly the facts an agent needs before making an irreversible change to its own credentials.

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?

Four short sentences, front-loaded with purpose, then the risk condition, then the irreversible consequences, then the empty-body confirmation. Every sentence carries information the agent would otherwise have to guess.

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, irreversible auth operation with an output schema already covering the response, the description supplies auth requirement, irreversibility, and the one-time visibility of the new key. Nothing an agent needs before invoking is absent.

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 schema has zero parameters (baseline 4), and the description reinforces this with 'No body is required,' which reassures the agent it should not attempt to construct a payload. It adds nothing further about the auth credential beyond where it is passed, but nothing is missing either.

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 ('Replace your API key') and adds the underlying operation ('Wraps POST /api/auth/rotate-key'), so there is no ambiguity. No sibling tool in the catalog touches credentials, so it is trivially distinguishable from the creature/credit tools.

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 an explicit trigger condition: 'if it may have leaked.' It does not describe when not to use it or any alternative path, but there is no plausible alternative for key rotation, so the guidance is effectively complete for this tool.

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.