Skip to main content
Glama

RevClamp MCP Server

Simulate Webhook Replay & Out-of-Order State Machine

revclamp_simulate_webhook_replay
Read-onlyIdempotent

Deterministically evaluate an ordered or out-of-order sequence of 1-10 Stripe/Shopify/RevClamp subscription lifecycle webhooks against a 72-hour idempotency deduplication Set (eventId), a configurable idempotencyWindowSec (60s-2592000s, default: 259200s / 72h), and a monotonic transition timestamp guard (event.createdSec >= lastAppliedCreatedSec). Compares RevClamp's monotonic FSM against a naive overwrite-on-arrival handler to detect resurrected canceled subscriptions, stale tier downgrades, and duplicate retry side-effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, simulation, steps, finalStatus, finalTier, finalEntitlementDecision, naiveFinalStatus, and naiveHandlerBug.

Input Schema

NameRequiredDescriptionDefault
eventsNoOptional custom array of 1 to 10 webhook events ({ eventId, eventType, createdSec, subscriptionStatus, tier, currentPeriodEndSec }) in arrival order.
nowSecNoReference evaluation timestamp in Unix seconds used to check the 72-hour idempotency window.
scenarioPresetNoScenario preset to evaluate when custom events are omitted (default: 'out_of_order_stale_update_after_cancel').
idempotencyWindowSecNoDeduplication and replay-acceptance window in seconds (valid range: 60 to 2592000, default: 259200 for 72 hours).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, so the bar is lower, but the description adds real behavioral context: deterministic evaluation, stateless ephemeral audit, and the specific bug classes detected (resurrected canceled subscriptions, stale downgrades, duplicate retry side-effects). It stops short of stating rate limits or cost, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and mechanism, and every clause carries substance. It is two very dense, long sentences, however, so it is packed rather than lean — slightly harder to scan than an ideal definition.

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?

Although there is no output schema, the description enumerates the structuredContent fields (ok, mode, steps, finalStatus, naiveFinalStatus, naiveHandlerBug, etc.), so an agent knows both inputs and outputs. For a 4-param, read-only simulation tool this is complete.

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?

Schema coverage is 100%, so baseline is 3; the description still contributes by explaining the semantics behind the params — the dedup Set is keyed on eventId, the guard compares event.createdSec against lastAppliedCreatedSec, and it restates the window range/default and 1-10 event bound. That adds interpretive value beyond the field descriptions.

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 (simulate/replay evaluation) and resource (webhook lifecycle event sequences) plus the exact mechanisms applied: idempotency dedup Set, configurable window, and monotonic timestamp guard. It also names the contrast target (naive overwrite-on-arrival handler), which makes the tool's role unmistakable versus siblings like verify_webhook_signature.

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 conveys the context (evaluating ordered/out-of-order webhook sequences against a dedup window) but never states when to choose this over revclamp_verify_webhook_signature or other siblings, and gives no explicit exclusions. Usage is implied rather than routed.

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.