Skip to main content
Glama
businessapi-mcp

businessapi-mcp

by JoeFu

Verify Webhook Signature

verify_webhook_signature
Read-only

Verify Business API webhook deliveries locally by recomputing HMAC-SHA256 and comparing the X-Bapi-Signature value in constant time, helping debug receiver signature checks.

Instructions

Verify a Business API webhook delivery LOCALLY (no network): recompute HMAC-SHA256 over "{t}.{raw_body}" with the endpoint's whsec_ secret and compare it to v1 from the X-Bapi-Signature header ("t=1785552011,v1=") in constant time. raw_body must be the exact bytes received (re-serialised JSON breaks the hash). Returns {valid, reason, ageSeconds}. Use it to debug a receiver; in production implement the same check in the receiver itself.

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": {
      "secret": "<secret>",
      "signature_header": "<signature_header>",
      "raw_body": "<raw_body>"
    },
    "name": "verify_webhook_signature"
  }
}

Input Schema

NameRequiredDescriptionDefault
secretYes
raw_bodyYes
signature_headerYes
tolerance_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description reinforces this with "LOCALLY (no network)" plus a constant-time comparison detail that annotations cannot convey. It also discloses the critical input constraint that raw_body must be exact received bytes because re-serialised JSON breaks the hash. Minor deduction for restating the return shape {valid, reason, ageSeconds}, which the output schema already supplies.

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?

The algorithm and format are front-loaded, constraints follow, and the usage caveat closes it; every sentence adds a fact the agent needs. No filler or restatement of the name/title.

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 cryptographic check, the description supplies the algorithm, the signed string layout, the header format, the byte-exactness constraint, and the call-site caveat; the output schema covers return values. The only missing piece is the tolerance_seconds window, which is also the parameter most likely to cause a confusing verification failure.

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 0%, so the description must carry parameter meaning, and it does for three of four: secret (the endpoint's whsec_ secret), signature_header (with concrete format "t=1785552011,v1=<hex>"), and raw_body (exact bytes, no re-serialisation). tolerance_seconds and its 300s default are never mentioned, leaving one gap.

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?

The description names a precise verb and resource — recompute HMAC-SHA256 over "{t}.{raw_body}" with the endpoint's whsec_ secret and compare against v1 from X-Bapi-Signature — and explicitly scopes it to local, non-network verification. That is instantly distinguishable from the webhook CRUD siblings (create/update/delete/rotate) and from call_endpoint.

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?

It gives an explicit when: "Use it to debug a receiver." And an explicit when-not with the alternative: "in production implement the same check in the receiver itself." The agent knows both the intended use and the boundary without inference.

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