Skip to main content
Glama

Verify a webhook signature

verify_webhook_signature
Read-onlyIdempotent

Validates a Perly Pay webhook's HMAC-SHA256 signature and age locally to debug handlers that reject genuine events.

Instructions

Checks a Perly Pay webhook on this machine: the HMAC-SHA256 in its Perly-Signature header against the raw body and the endpoint's signing secret, and that it is under five minutes old. Nothing is sent anywhere. Use it to debug a webhook handler that rejects real events.

Pass the body exactly as received (the raw text, before JSON parsing). secret defaults to PERLY_PAY_WEBHOOK_SECRET.

Input Schema

NameRequiredDescriptionDefault
secretNoThe endpoint's signing secret, `whsec_…`. Default: PERLY_PAY_WEBHOOK_SECRET.
payloadYesThe request body, exactly as received.
signatureYesThe Perly-Signature header: `t=…,v1=…`.
tolerance_secondsNoHow old a signature may be. Default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes well past the annotations by disclosing the algorithm, the five-minute freshness window, and that 'nothing is sent anywhere', which confirms the openWorldHint=false annotation in plain language. It stops short of saying what a failure result looks like (boolean vs. error), which matters for a verification tool with no output schema.

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?

The purpose and the local/no-network guarantee are front-loaded in the first sentence; the second paragraph carries the raw-body warning. Efficient overall, with only slight redundancy in restating the `secret` default that the schema already documents.

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?

For a four-parameter, read-only tool with no output schema, the description covers the mechanism, the network-free guarantee, and the one non-obvious input pitfall. The remaining gap is the return value: it never says what a success or stale-signature result looks like, which an agent must infer.

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, but the description earns extra credit by adding the operationally critical detail that the body must be raw text captured 'before JSON parsing' — a classic source of false negatives that the schema wording alone would not convey. It otherwise restates the documented default for `secret`.

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 (verifies) plus the exact resource and mechanism: an HMAC-SHA256 check of the Perly-Signature header against the raw body and signing secret. That is clearly distinct from the neighbouring webhook tools (list_webhook_endpoints, create_webhook_endpoint, delete_webhook_endpoint), which all manage endpoint configuration rather than validate a delivery.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case — 'debug a webhook handler that rejects real events' — and an implicit exclusion by framing it as a local debugging aid, while every sibling tool is a CRUD/configuration action. An agent can decide whether to call it without opening the schema.

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