Skip to main content
Glama

Verify webhook signature

verify_webhook_signature
Read-only

Validate Mercado Pago webhook x-signatures offline with HMAC-SHA256, no access token, returning validity and the signed manifest for debugging.

Instructions

Verify a Mercado Pago webhook x-signature locally with HMAC-SHA256. Runs offline and needs no access token. Returns whether it is valid and the signed manifest for debugging.

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": {
      "x_signature": "<x_signature>"
    },
    "name": "verify_webhook_signature"
  }
}

Input Schema

NameRequiredDescriptionDefault
secretNoWebhook secret from Your integrations. Omit to use MP_WEBHOOK_SECRET from the server env
data_idNodata.id from the notification URL query string (not the JSON body)
x_signatureYesRaw x-signature header, e.g. "ts=1742505638683,v1=<hex>"
x_request_idNoRaw x-request-id header
max_age_secondsNoReject signatures older than this. Omit when replaying old notifications

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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; the description reinforces this by stating it runs offline with no access token, so the agent knows there is no network call or side effect. It also discloses the return shape (validity flag plus signed manifest for debugging), which annotations cannot convey. Remaining gaps are small: no note on failure modes such as a missing secret or unresolvable env fallback.

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 sentences, front-loaded with the verb, resource, and algorithm; the offline/no-token constraint and the return summary each earn their place with 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?

For a five-parameter read-only tool with full schema coverage and no output schema, the description covers the essentials: it is local, it needs no auth, and it returns validity plus the signed manifest. What is missing is only edge-case framing (e.g. behavior when the secret is neither supplied nor present in the environment).

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%, and the schema itself documents the x-signature format, the env fallback for secret, the query-string origin of data_id, and the replay caveat on max_age_seconds. The description adds nothing parameter-level beyond echoing the header name and hash algorithm, so the baseline 3 applies.

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 and resource ("Verify a Mercado Pago webhook x-signature") plus the exact mechanism (HMAC-SHA256), which immediately separates it from the read-oriented siblings like get_payment and search_payments.

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 clear operating context — runs locally, offline, no access token required — which tells the agent this is a pure computation rather than an API call. It stops short of naming explicit when-not conditions or an alternative path, but the sibling set contains no competing verification tool, so the gap is minor.

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