Skip to main content
Glama

hb_verify_webhook_signature

Read-onlyIdempotent

Verify or compute a Hub webhook signature by validating the HMAC-SHA256 of timestamp and raw body, and reject deliveries outside the 300-second replay window.

Instructions

Pure local helper (no network): verify or compute a Hub webhook signature. The signature is "sha256=" plus the hex HMAC-SHA256 of "{timestamp}.{raw body}" with the endpoint secret; deliveries older or newer than 300 seconds are rejected. Pass the raw body byte-for-byte. The secret is read from HB_WEBHOOK_SECRET unless passed (prefer a sandbox secret if you pass it in chat). Omit signature to just compute it.

Input Schema

NameRequiredDescriptionDefault
bodyYesThe raw request body exactly as received.
secretNoEndpoint signing secret. Defaults to env HB_WEBHOOK_SECRET.
signatureNoThe X-Hub-Signature header. Omit to compute the expected signature.
timestampYesThe X-Hub-Timestamp header (epoch seconds).
now_epoch_secondsNoOverride the current time (for testing recorded deliveries).
tolerance_secondsNoReplay window; default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantial behavior beyond them: the exact signing algorithm, the 300-second replay rejection window, the byte-for-byte raw-body requirement, the HB_WEBHOOK_SECRET env fallback, and a secret-handling caution. These are exactly the facts an agent needs to call it correctly and none are in the annotations.

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?

Five short sentences, front-loaded with the single most decision-relevant fact (local, no network), then the algorithm, then the mode switch. There is mild overlap between "300 seconds" and `tolerance_seconds`'s default, but it is justified because it also states the rejection behavior.

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 carries the return-value burden and only half covers it: it implies compute returns the signature string, but never says what verify returns (boolean, error, mismatch detail). Everything else an agent needs — inputs, algorithm, replay policy, secret source — is present.

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, but the description adds meaning the schema does not: that `signature` being omitted flips the tool into compute mode, that `secret` falls back to an environment variable, and that `body` must be passed byte-for-byte rather than parsed. Only `now_epoch_seconds` and `tolerance_seconds` are left purely to the schema.

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?

Opens with a specific verb pair and resource: "verify or compute a Hub webhook signature", and immediately distinguishes itself from every sibling by declaring "Pure local helper (no network)" — the siblings are all remote API tools. An agent can classify this tool without opening the 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?

Explicitly gives the mode switch ("Omit `signature` to just compute it") and a situational recommendation ("prefer a sandbox secret if you pass it in chat"). It doesn't name a when-not-to-use case or an alternative tool, but none of the siblings overlap, so there is little left ambiguous.

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