Skip to main content
Glama

invalidate_payment_link

Destructive

Cancel a payment link unconditionally, making it unusable. Irreversible: issue a new link with a fresh reference ID for future payments.

Instructions

Cancel a payment link unconditionally so it can no longer be used.

Irreversible: the buyer will not be able to pay through that URL afterwards, and you
would have to issue a new link with a fresh reference ID — reference IDs are unique
across every link you have ever created and cannot be reused.

This does NOT check the link's status first, and Wayl documents no error for
invalidating a link that has already been paid — the outcome in that case is
undefined. Prefer `invalidate_payment_link_if_pending`, or confirm with
`check_order_paid` first.

It cancels the checkout, not the money: if the buyer already paid, use `create_refund`.
Returns Wayl's raw envelope, and the write is not retried on a transient failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reference_idYesYour reference ID for the link to cancel — the one you set at creation, not Wayl's internal `id`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already mark the operation as destructive, but the description adds crucial context: irreversibility, reference ID uniqueness and non-reusability, lack of status checking, undefined outcome for paid links, non-retry on transient failures, and the raw envelope return. This far exceeds the annotation baseline and fully discloses behavioral nuances.

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 description is front-loaded with the core action, then delivers necessary warnings and alternatives without redundant language. Every sentence provides distinct value, and the structure (purpose, consequences, caveats, alternatives, return behavior) is logical and easy to parse.

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?

For a destructive, irreversible operation, the description covers all key aspects: irreversible consequences, unique ID constraints, undefined behavior on paid links, alternative tools, and retry behavior. The output schema exists, so return values need no explanation, and the description still manages to mention it returns the raw envelope.

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?

The schema covers the parameter with 100% description, and the tool description reinforces it by explaining that reference IDs are unique and cannot be reused, and that the parameter is the user-set reference ID, not Wayl's internal ID. This adds meaningful semantic context beyond the schema, though the schema already carries the primary definition.

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 opens with a specific verb and resource: 'Cancel a payment link unconditionally so it can no longer be used.' It clearly distinguishes from the sibling `invalidate_payment_link_if_pending` by emphasizing 'unconditionally' and from `create_refund` by noting it cancels the checkout, not the money.

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?

Explicit guidance is provided: 'Prefer `invalidate_payment_link_if_pending`, or confirm with `check_order_paid` first.' It also directs users to `create_refund` if the buyer already paid, and warns that invalidating a paid link yields undefined behavior. This is comprehensive when-to-use and when-not-to-use advice.

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