Skip to main content
Glama

create_refund

Destructive

Request a refund for a paid order, returning money to the customer. Verify the amount does not exceed the original payment; refunds are reviewed and can be cancelled until approved.

Instructions

Request a refund against a paid order. This sends real money back to a customer.

The order must already be paid and linked to a customer, and `amount` may not exceed
what the buyer actually paid — run `check_order_paid` first if you are unsure the
order settled.

Wayl reviews the request, so the refund starts in status 'Requested' rather than being
applied immediately; while it sits there you can still withdraw it with `cancel_refund`.
Once Wayl moves it to 'Refunded' there is no undo, so confirm the amount with the user
before calling.

This POST is never retried automatically and Wayl offers no idempotency key: call it
twice and you have two refunds. Save the returned `id` — `get_refund` and `cancel_refund`
need it, and `list_refunds` is the only other place to recover it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount to return in whole IQD. Minimum 1000, and no more than what the buyer actually paid.
reasonYesWhy the refund is warranted. Wayl requires 100-1500 characters — state what was bought, what went wrong, and what the customer asked for.
reference_idYesReference ID of the paid order to refund.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond the annotation `destructiveHint: true`, the description discloses critical behavioral traits: the refund is irreversible once 'Refunded', there is no idempotency key so duplicate calls create duplicate refunds, and the returned `id` must be saved for `get_refund`/`cancel_refund`. It also notes the POST is never retried. This is rich, non-obvious context that annotations alone do not provide.

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 compact yet information-dense. Every sentence serves a purpose: what it does, prerequisites, approval flow, cancellation option, irreversibility warning, idempotency caveat, and ID recovery advice. The structure is logical, moving from action to lifecycle to cautions, with no redundant words.

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?

Given the tool's destructive nature and the existence of an output schema, the description covers all essential context: prerequisite conditions, workflow states, error-prone amount ceiling, no-undo warning, duplicate-risk, retry policy, and how to recover the ID. It fully equips an agent to invoke the tool correctly and handle follow-ups.

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 already provides 100% coverage with clear descriptions for `reference_id`, `reason`, and `amount`. The description reinforces the amount constraint ('may not exceed what the buyer actually paid') and the reason length requirement, but adds no new per-parameter semantics beyond what the schema states. This meets the baseline for fully documented schemas.

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+resource: 'Request a refund against a paid order.' It clarifies the real-world effect ('sends real money back') and distinguishes from sibling tools like `list_refunds`, `get_refund`, and `cancel_refund` by focusing on the creation action. No ambiguity about what the tool does.

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 gives explicit when-to-use and when-not-to-use guidance. It instructs calling `check_order_paid` first if unsure, notes that Wayl reviews the request so it starts as 'Requested', and explains that `cancel_refund` can withdraw it while pending. This clearly orients the agent relative to alternatives and prerequisites.

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