Skip to main content
Glama

Cooper Email

Rotate a webhook secret

cooper_rotate_webhook_secret
Destructive

Use this when a webhook signing secret should change without breaking receivers that still check the old secret. Requires auth. Inputs: webhook_id (required). Mints a new secret (whsec_…), stores it as the current secret, and keeps the previous secret valid for 24 hours. Returns the webhook with the new secret in full once, previous_secret_expires_at (ISO-8601), and previous_secret_active true. The previous secret value is not returned. For those 24 hours each delivery sends x-cooper-signature as sha256=,sha256= and x-cooper-signature-v2 as v1=,v1=, current secret first. Verify by splitting on the comma and accepting the delivery when any segment matches. Rotating again replaces the previous secret and resets the 24 hour window. A hook with no secret just stores the new one. Needs webhook_write, the same permission as updating a webhook. Fails with 404 webhook_not_found or 403 permission_denied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_idYesWebhook id (wh_…) whose signing secret should rotate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

The description adds rich behavioral context beyond the annotations: it explains the 24-hour dual-secret window, the exact signature header formats, how receivers should verify them, that the previous secret value is never returned, and the concrete error codes for missing webhook and permission failures. This is exceptionally complete for a mutation tool.

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 front-loaded with the trigger condition, then proceeds logically through inputs, secret behavior, return shape, signature verification, permission requirements, and failure modes. Every clause carries actionable information for correct invocation or handling, so the length is justified.

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 single-parameter mutation tool with no output schema, the description supplies everything an agent needs: when to use it, what it returns, how the grace period works, how to interpret the signature headers, required permissions, and possible errors. No critical gap remains.

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 webhook_id fully. The description only repeats that webhook_id is required and adds no format, source, or constraint details beyond the schema, making this the expected baseline score.

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 states a specific verb and resource—minting a new webhook signing secret while keeping the old one valid—and distinguishes this from merely updating a webhook. An agent can identify the exact operation 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?

It clearly says when to use the tool: when a webhook secret should change without breaking receivers that still check the old secret. It also notes the required permission and that rotating again resets the grace window. However, it does not name explicit alternatives or when-not-to-use conditions, so it falls short of the top score.

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.