Skip to main content
Glama
cyberdroid2077

opsecforge-mcp

Verify a webhook signature offline

verify_webhook
Read-onlyIdempotent

Verify GitHub, Stripe, or generic HMAC webhook signatures offline from a raw body file and an env-var secret, then explain mismatches such as bad formatting, expired Stripe timestamps, or wrong secret.

Instructions

Verifies a GitHub, Stripe or generic HMAC webhook signature locally and explains why a mismatch happened. The signing secret is read ONLY from the environment variable named in secret_env; there is no parameter for a plaintext secret and one is rejected if supplied. The body is read as raw bytes from body_path. Returns match / no match plus diagnostics: whether the signature header is well-formed, whether the Stripe timestamp is outside the tolerance, whether the body looks reformatted (trailing newline, CRLF, re-serialized or pretty-printed JSON) and common secret mistakes (whitespace, wrong key type). It sends nothing over the network and never returns the secret or a computed signature.

Input Schema

NameRequiredDescriptionDefault
providerYesgithub: X-Hub-Signature-256 (sha256=<hex>). stripe: Stripe-Signature header (t=...,v1=...). generic: plain HMAC over the body, hex (or base64) signature.
algorithmNoHMAC hash for provider "generic" (default sha256). Not used by github or stripe.
body_pathYesPath to a file holding the RAW request body exactly as received (not re-serialized). Read as bytes, up to 10 MiB.
signatureYesThe signature header value as received. It is not a secret.
secret_envYesNAME of the environment variable that holds the signing secret (for example GITHUB_WEBHOOK_SECRET). Never the secret itself.
tolerance_secondsNoStripe only: maximum allowed age of the signed timestamp in seconds (default 300).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only, non-open-world, idempotent and non-destructive, and the description adds substantial context on top: secret sourced only from an env var, plaintext secrets rejected, body read as raw bytes, no network traffic, and neither the secret nor a computed signature is returned. This is exactly the kind of behavior an agent cannot infer from structured fields.

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?

Purpose is front-loaded in the first clause, followed by the input contract and then the returned diagnostics. Every sentence carries distinct information with no restatement of the name or schema.

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?

With no output schema, the description takes responsibility for return values and does so explicitly (match/no-match plus well-formedness, Stripe tolerance, body-reformatting and secret-mistake diagnostics). All 6 parameters are documented at 100% coverage and the offline constraint is stated, leaving no material gap.

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 the baseline is 3; the description goes further by clarifying the non-obvious secret_env indirection (a variable NAME, never the secret, with rejection of plaintext) and the raw-bytes contract for body_path. It adds the environmental/permission constraint that the schema alone cannot express.

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 ('Verifies a GitHub, Stripe or generic HMAC webhook signature') plus the mode of operation ('locally'). This is clearly distinguishable from siblings like inspect_jwt, file_checksum and scan_secrets 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?

Gives clear context: offline verification of webhook signatures, with an emphasis on diagnosing why a mismatch happened. It does not name alternative tools or explicit when-not conditions, but the usage scenario is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.