Skip to main content
Glama

parse_webhook

Read-onlyIdempotent

Verify the Wayl webhook signature, parse the payload, and determine whether the order is paid—all locally with no network call. Reads the correct paymentStatus field for accurate results.

Instructions

Verify a Wayl webhook and summarise what it says about the order.

Use this for any incoming delivery: it authenticates the signature, parses the
payload and reports whether the order is paid, all locally with no network call.
Use `verify_webhook` when a bare valid/invalid boolean is enough, and
`check_order_paid` when polling by reference ID rather than handling a push.

The webhook's `paymentStatus` is a different vocabulary from the REST API's link
`status` — it reports "Paid", which is not one of the eight link statuses. This
tool reads the right field so you do not have to.

Never act on a payload where `verified` is false; that result carries no order
details. `paid` and `safeToFulfil` are deliberately different: while this server is
in test mode a settled payment is simulated, so `safeToFulfil` stays false even when
`paid` is true. Branch on `safeToFulfil`.

Deduplicate on `eventId` before delivering — Wayl retries, and the signature has no
timestamp, so a replayed request stays valid forever. A verified body that is not a
JSON object raises an error rather than returning a false verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secretNoThe webhookSecret used when this link was created. Wayl scopes secrets per link, so pass the one matching this order.
headersNoThe webhook's headers; the signature header is found automatically.
raw_bodyYesThe webhook request body exactly as received, byte for byte. Wayl sends it with Content-Type: text/plain, so read the raw body rather than relying on a JSON body parser.
signatureNoValue of the x-wayl-signature-256 header.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description goes far beyond the annotations by revealing critical behaviors: it operates 'all locally with no network call,' handles the different paymentStatus vocabulary, simulates payment in test mode via safeToFulfil, and warns about replay attacks due to missing timestamps. This is valuable context not present in readOnlyHint or idempotentHint.

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?

Although long, every sentence earns its place for a security-sensitive webhook tool. It opens with the core purpose, moves to usage alternatives, then covers essential caveats. The structure is logical, front-loaded, and densely informative without redundancy.

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?

The description covers the full operational context: authentication, payload parsing, safety fields, idempotency, replay risks, and error behavior. Given the tool's complexity and the presence of an output schema for return values, this is comprehensive and leaves no critical gaps.

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 coverage is 100%, so parameter meaning is already documented. The description adds extra semantic guidance, such as reading raw_body byte-for-byte because Wayl sends text/plain, and that headers/signature are found automatically. This supplements the schema with practical context, though it does not systematically walk through each parameter.

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 first sentence immediately states the specific verb and resource: 'Verify a Wayl webhook and summarise what it says about the order.' It distinguishes itself from siblings by explicitly naming the alternatives and their different use cases, making its purpose unmistakable.

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?

The description provides clear guidance on when to use this tool: 'Use this for any incoming delivery.' It also explicitly contrasts with alternatives: 'Use verify_webhook when a bare valid/invalid boolean is enough, and check_order_paid when polling by reference ID.' It adds operational warnings like deduplicating on eventId and never acting on unverified payloads.

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/muthanii/waylMCP'

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