Skip to main content
Glama

cancel_refund

Destructive

Cancel a pending refund request before it's processed, preventing the money from being returned. Use when the refund is still in 'Requested' status.

Instructions

Withdraw a refund request before Wayl acts on it, so no money is returned.

Only refunds still in status 'Requested' can be cancelled. Once Wayl has moved one
to Refunded or Rejected this call will not take it back, so check with `get_refund`
first when you are unsure of the state.

`refund_id` is Wayl's own ID for the refund — the `id` returned by `create_refund`
— not your order's reference ID. If you only have the order, find it with
`list_refunds(reference_id=...)`.

This touches the refund request only; the payment link and the buyer's completed
payment are unaffected. To stop a buyer paying in the first place, use
`invalidate_payment_link_if_pending` instead.

Confirm with the user before calling. Undoing it means filing a fresh refund with
a new 100-character reason, and Wayl reviews that from scratch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refund_idYesWayl's own ID for the refund — the `id` field in the `create_refund`, `get_refund` or `list_refunds` response. NOT your order's reference ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations mark the tool as destructive, but the description adds meaningful context: it only affects the refund request, not the payment link or buyer's payment, requires user confirmation, and the undo involves filing a fresh refund with a new reason and re-review. This goes well beyond the annotation hints.

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?

Every sentence carries necessary information—state constraints, ID disambiguation, side effects, alternatives, and caution. The structure flows logically from action to limitations to confirmation, with no filler or 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?

For a destructive, state-dependent tool, the description covers prerequisites, scope of impact, user confirmation, and consequences. An output schema exists, so return-value documentation is not needed here. The description is fully self-sufficient for correct invocation.

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 already thoroughly describes refund_id with 100% coverage. The description reinforces this and adds how to find the ID when only the order reference is available (list_refunds with reference_id). This exceeds the schema baseline.

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 action: 'Withdraw a refund request before Wayl acts on it, so no money is returned.' It clearly identifies the resource (refund request) and the effect, and differentiates from sibling tools like invalidate_payment_link_if_pending.

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?

Provides explicit when-to-use and when-not-to-use guidance: only for 'Requested' status, not for 'Refunded' or 'Rejected', suggests checking get_refund first, and names the alternative invalidate_payment_link_if_pending for stopping payment. Also gives direction to list_refunds when only the order reference is known.

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