Skip to main content
Glama

verify_webhook_signature

Validate HMAC-SHA256 webhook signatures from Stripe or Razorpay to confirm payload authenticity and prevent tampering before processing.

Instructions

Validates the cryptographic HMAC-SHA256 signature and tamper-resistance of an incoming webhook HTTP request payload against a shared webhook signing secret. Returns a JSON boolean indicating whether the signature matches the payload digest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secretYesThe private shared webhook signing secret configured in your provider developer dashboard.
providerYesThe originating payment provider determining the signature algorithm ("stripe" parses timestamped t=,v1= signatures; "razorpay" computes standard hex HMAC-SHA256 digests).
signatureYesThe cryptographic signature string extracted from the HTTP request headers ("x-razorpay-signature" for Razorpay, "stripe-signature" for Stripe).
rawPayloadYesThe exact unparsed UTF-8 raw string body of the incoming HTTP request before any JSON parsing or middleware transformations.
Behavior3/5

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

No annotations exist, so the description must disclose behavioral traits. It clarifies the return value as a JSON boolean to ensure 'whether the signature matches the payload digest'. It does not describe side-effect behavior (or lack thereof), error handling for malformed signatures, or whether the check is performed locally without network calls, leaving some burden unmet.

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 core operation and result. Every word contributes useful signal; there is no filler, repetition, or boilerplate.

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 four parameters thoroughly described in the schema and the description stating the return behavior, the essentials for selecting and invoking the tool are present. It loses only a point because explicit edgecase behavior—such as invalid signature formats or missing provider keys—is not addressed.

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?

The input schema covers all four parameters with detailed descriptions, including provider-specific signature formats and raw payload requirements, so the description need not repeat this. The overall description reuses the notion of 'payload digest' but does not substantially add to schema-level parameter semantics.

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?

Description clearly identifies the operation with a specific verb—"Validates"—and a well-defined resource: the cryptographic HMAC-SHA256 signature of an incoming webhook payload. It states the comparison against a shared secret and the JSON boolean result, making it unambiguous and distinct from webhook-creation or analytics sibling tools.

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

Usage Guidelines3/5

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

The description conveys useful context: this is for verifying an incoming webhook's signature before trusting the payload. It does not, however, explicitly state when not to use it, mention alternatives like trigger_mock_webhook for testing, or give guidance on prerequisite steps like retrieving the correct provider secret.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pritam825/unified-pay-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server