Skip to main content
Glama

Check a webhook signature

check_webhook_signature
Read-only

Verifies an X-KHQRPay-Signature header against the raw webhook body using the server's configured secret, and reports malformed headers, expired timestamps, or mismatches.

Instructions

Checks an X-KHQRPay-Signature header against a webhook's raw body, with the signing secret from this server's KHQRPAY_WEBHOOK_SECRET (the secret is never an argument and never shown). Says why a check fails: a malformed header, a timestamp more than 5 minutes off, or a mismatch. Runs on this machine; nothing is sent anywhere.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "raw_body": "<raw_body>",
      "signature_header": "<signature_header>"
    },
    "name": "check_webhook_signature"
  }
}

Input Schema

NameRequiredDescriptionDefault
raw_bodyYesThe request body exactly as received, before any JSON parsing.
signature_headerYesThe X-KHQRPay-Signature header's value: t=<unix seconds>,v1=<hex>.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses key behavioral traits: the secret is never an argument and never shown, the check runs locally with nothing sent anywhere, and failures are explained by category (malformed header, timestamp more than 5 minutes off, mismatch). The 5-minute tolerance is a real behavioral constraint the agent could not otherwise know.

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?

Two compact sentences, each carrying non-redundant information: the first defines the operation and secret source, the second defines failure reporting and local execution. Nothing is repeated from the schema and there is no filler.

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?

With no output schema, the description must describe return values, and it does so partially by stating the tool 'says why a check fails' with three failure categories. It does not specify the success result shape (boolean vs. structured object), which is the only material gap for a two-parameter verification tool.

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 description coverage is 100%, so the baseline is 3; the description adds meaningful meaning beyond it by clarifying that only the raw body and header are arguments and that the signing secret is deliberately excluded. The 5-minute skew note also explains why a stale timestamp produces a failure rather than a parameter error.

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 (checks) and a specific resource (an X-KHQRPay-Signature header against a webhook's raw body), and names the signing secret's source. The subject matter is clearly distinct from the payment-oriented siblings, so an agent can tell it isn't a payment read/write tool.

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?

The description makes the calling context obvious: verify an inbound webhook's signature header against the raw body, with the secret supplied by the local environment. It gives no explicit 'do not use this for X' or alternative-comparison language, but the siblings are unrelated payment tools, so there is little ambiguity to resolve.

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