Skip to main content
Glama

Verify webhook

jami_verify_webhook
Read-onlyIdempotent

Verify webhook authenticity with timing-safe HMAC and replay protection to debug signature mismatch errors in handlers.

Instructions

Check whether a webhook delivery is genuine — the same timing-safe HMAC check and replay guard the SDK runs. Use it to debug "signature mismatch" errors in a handler.

Args:

  • payload: the RAW request body exactly as received (not re-serialized JSON — whitespace matters).

  • signature: the X-JamiDev-Signature header, "t=,v1=".

  • secret: the subscription's webhook secret (defaults to JAMI_WEBHOOK_SECRET).

  • tolerance_seconds: max age of the timestamp (default 300). Raise it to check an old captured delivery.

Returns: { valid, reason, event_type, event_id, livemode }. An invalid signature is a normal result (valid: false), not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secretNo
payloadYesRaw request body
signatureYesX-JamiDev-Signature header value
tolerance_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
reasonYes
event_idYes
livemodeYes
event_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/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), and the description adds real behavioral context beyond them: it discloses the timing-safe HMAC + replay-guard semantics and, crucially, that 'an invalid signature is a normal result (valid: false), not an error' — a key invocation expectation an agent would otherwise get wrong.

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?

Front-loaded purpose sentence, then clearly labeled Args and Returns sections. No filler; each line (raw-body caveat, signature format, default source, invalid-is-normal) earns its place.

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?

Despite the 50% schema coverage gap, the description documents all four parameters, the return shape, and the non-error semantics of a failed check. Nothing an agent needs to invoke or interpret this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% (payload/signature documented; secret/tolerance_seconds not), but the Args block fully compensates: it explains payload must be the RAW body ('whitespace matters'), the exact signature format 't=<unix>,v1=<hex>', that secret defaults to JAMI_WEBHOOK_SECRET, and the tolerance rationale for old deliveries.

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 (check/verify) and resource (webhook delivery), and immediately qualifies what 'genuine' means — 'the same timing-safe HMAC check and replay guard the SDK runs'. An agent can tell this apart from sibling jami_create_test_webhook, which creates rather than verifies.

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 a concrete when-to-use scenario: 'Use it to debug "signature mismatch" errors in a handler.' That is clear context, but it names no alternatives or exclusions (e.g. when to generate a test webhook instead), so it stops short of a 5.

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