Skip to main content
Glama
Meta Business Messaging

Meta Business Messaging

webhook_validate_signature

Verify Meta webhook payloads by validating X-Hub-Signature-256 HMAC-SHA256 signatures against the raw body and app secret to reject forged requests.

Instructions

HMAC-SHA256 verification for Meta POST webhooks (X-Hub-Signature-256 header).

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": "<signature>"
    },
    "name": "webhook_validate_signature"
  }
}

Input Schema

NameRequiredDescriptionDefault
raw_bodyYesRaw POST body, byte-for-byte as Meta sent it
signatureYesValue of the X-Hub-Signature-256 header, e.g. 'sha256=abcdef…'
app_secretNoMeta app secret (falls back to META_APP_SECRET env)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full burden and discloses only the algorithm and header. It does not say whether a mismatch throws an error or returns a boolean/status, whether comparison is constant-time, or that the app secret may be supplied or read from the environment.

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?

A single front-loaded sentence with no filler; the algorithm and header appear immediately. However, the terseness shades into under-specification rather than efficient completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations, so the description is the only source of behavioral truth, yet it omits the return shape and failure semantics that matter most for a security gate. An agent cannot tell whether a failed check surfaces as an error, a falsey return, or a raised exception.

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

Parameters3/5

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

Schema description coverage is 100%, so raw_body, signature, and app_secret are already well documented, including the env fallback. The description's contribution is limited to naming the header whose value goes into the signature parameter, which the schema already states. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific operation (HMAC-SHA256 verification) against a specific resource (Meta POST webhooks) and pins the header it consumes (X-Hub-Signature-256). It stops short of distinguishing itself from the sibling webhook_verify_challenge, which concerns the GET challenge handshake rather than signed POST payloads.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no ordering instruction (verify before webhook_parse_event), and no mention of what to do when verification fails. The webhook/POST framing implies the step belongs ahead of event parsing, but the agent must infer that.

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