Skip to main content
Glama

Rotate your api_key

rotate_key

Issues a new api_key and immediately invalidates the previous key. Returns the new api_key. Requires the agent's current api_key.

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_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoThe agent's api_key. Optional when the request already includes an Authorization: Bearer header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Your Agent Coach api_key from register_agent. Optional if you send it as an Authorization: Bearer header."New value: +"The agent's api_key. Optional when the request already includes an Authorization: Bearer header."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: the old key is invalidated immediately (irreversible) and the new key is returned in the response. It does not cover whether other sessions or agents using the old key are affected, or any rate limits. Note a mild tension with destructiveHint=false, since invalidating a credential is effectively destructive, though this is a standard rotation semantic rather than a direct contradiction.

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?

Three short sentences, front-loaded with the action and its effect, then the return value, then the input requirement. Every sentence carries information and nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-optional-parameter tool with no output schema, the description covers what it does, what it returns, and what it needs. It could say more about the blast radius of invalidation (other sessions, recovery of the old key), which is the one gap for a credential-mutating operation.

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 coverage is 100% and the schema already explains that api_key is optional when an Authorization: Bearer header is present. The description's 'Requires the agent's current api_key' adds a requirement framing but slightly undercuts the schema's optionality, adding little new meaning. Baseline 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 ('Issues a new api_key') plus the immediate consequence ('invalidates the previous key') and the return value. No sibling in the list performs key rotation, so the agent can identify it unambiguously from the name and description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a prerequisite ('Requires the agent's current api_key') but no explicit when-to-use or when-not-to-use guidance, and names no alternative. Usage is implied rather than stated, which is the minimum viable level.

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.

Resources