Skip to main content
Glama

Rotate merchant API key

shop.merchant.rotate_key

Revoke the Bearer key used for this call and return a fresh mk_live_ key (shown once). Works for deactivated merchants too, so open orders can still be closed.

Input Schema

NameRequiredDescriptionDefault
encryption_keyNoOptional: ALSO replace the buyer-data encryption key. New kid, same sig_by_wallet rule as registration. Envelopes sealed to the old kid are not re-encrypted: fetch them first.

Output Schema

NameRequiredDescriptionDefault
api_keyYes
terms_update_pendingNoPresent when a newer document version awaits re-acceptance (30-day window).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / encryption_key
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional: ALSO replace the buyer-data encryption key. New kid, same sig_by_wallet rule as registration. Envelopes sealed to the old kid are not re-encrypted: fetch them first.",
      +  "properties": {
      +    "alg": {
      +      "type": "string"
      +    },
      +    "kid": {
      +      "type": "string"
      +    },
      +    "pub": {
      +      "type": "string"
      +    },
      +    "sig_by_wallet": {
      +      "description": "EIP-191 signature by `wallet` over the encryption-key text.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kid",
      +    "alg",
      +    "pub",
      +    "sig_by_wallet"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive operation, and the description adds genuinely useful context beyond them: the new key is 'shown once' and the operation still works for deactivated merchants. It doesn't clarify key lifetime, rate limits, or revocation side effects, but the shown-once disclosure is a real behavioral addition.

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?

Two sentences, no filler, with the primary action and return contract front-loaded and the edge-case caveat trailing.

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?

Output schema exists so return values need no explanation, and the description covers the revocation behavior, key display constraint, and deactivated-merchant case. The only unaddressed item is the optional encryption_key replacement, which the schema handles adequately.

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% and the sole optional parameter (encryption_key) carries its own rich description covering the sig_by_wallet rule and the envelope re-encryption warning. The tool description adds nothing about this parameter, so baseline 3 applies – the schema does all the work.

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 (Revoke/rotate) and resource (the Bearer key used for this call), and specifies the return value (a fresh mk_live_ key). An agent can distinguish this rotation tool from siblings like shop.merchant.register or shop.merchant.deactivate without opening any schema.

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?

The clause 'Works for deactivated merchants too, so open orders can still be closed' gives a concrete condition and rationale for choosing this tool. It does not name alternative siblings or state explicit when-not conditions, so it falls short of a 5.

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.