Skip to main content
Glama

clerk.rotate_machine_secret_key

Rotate the secret key for a machine in a connected Clerk instance.

Sensitive — the response includes the new secret key; do not log or expose it.

Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account.

Returns the new secret key.

Cost = 10 tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
machine_idYesClerk machine id (mch_...) to retrieve or modify.
clerk_instance_idNoClerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account.
previous_token_ttlYesSeconds the previous secret key remains valid after rotation (0–28800).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
machine_secret_keyNoRotated machine secret key payload from the Backend API.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

There are no annotations, so the description carries the transparency burden. It prominently flags the response as sensitive and warns against logging or exposing the new key, and discloses the return value and cost. However, it doesn't explicitly mention that the old key remains valid for previous_token_ttl (though the schema covers that) or any required permissions.

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?

The description is compact and front-loads the main action, then provides a bolded sensitive warning, a prerequisite, return behavior, and cost. No wasted words.

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?

Given the tool's complexity, the description covers the core action, sensitivity, prerequisite, instance selection, and return value. Some behavioral details like TTL effect are left to the schema, but overall it's sufficient for correct invocation.

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?

All three parameters have descriptions in the schema (100% coverage), so the baseline is 3. The description adds no extra semantics beyond confirming the optional clerk_instance_id defaults to the connected account, which the schema already states.

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?

The description uses the specific verb 'rotate' with the resource 'secret key for a machine in a connected Clerk instance,' clearly distinguishing it from sibling tools like get_machine_secret_key (read) and rotate_oauth_application_secret (different resource).

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?

It instructs to call clerk.get_connected_accounts first and explains how to target a specific instance or default, providing clear usage context. It doesn't explicitly name alternatives or when-not-to-use, but the prerequisite and targeting logic are well covered.

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.