Skip to main content
Glama

Open a refund

create_refund
Destructive

Opens a refund for a paid invoice in the original asset and emails the buyer a link to provide a refund address. Ask the buyer first, then confirm; the action cannot be undone.

Instructions

Open a refund.

Starts a refund in the asset that was paid. We email the buyer a link to give an address; the link is never returned, since whoever holds it decides where the money goes. With no email on the invoice, the owner makes one in the dashboard. When the address is checked, the refund is ready_to_send with amount_to_send. Refused with sanctioned_sender when money on the invoice came from an address on a sanctions list, or one the coin's issuer froze: sending it back may itself be prohibited, so nothing refunds it — leave it and talk to a lawyer.

Test keys only: refused with a live key.

Cannot be undone — Opens a refund to the buyer. Ask the person first, then call with confirm: true.

Input Schema

NameRequiredDescriptionDefault
amountNoIn the paid asset's smallest unit. Default: everything still refundable.
reasonNo
confirmYestrue once the person has agreed to this exact call. Without it nothing is done.
invoiceYesA invoice id, `inv_…`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Far exceeds the annotations: it explains the emailed address link is never returned because the holder decides where funds go, what happens with no email on the invoice, the resulting `ready_to_send`/`amount_to_send` state, the `sanctioned_sender` refusal and why not to retry, and the test-key-only restriction. This is exactly the side-effect and failure-mode detail an agent needs on a destructive call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and its result, then failure modes then the irreversibility warning. Dense with useful information, though the sanctions aside ('leave it and talk to a lawyer') is slightly discursive for a tool description.

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 mutation with no output schema, the description supplies the outcome states, the refusal code, the confirm gating, and the test/live key constraint — enough for an agent to call it correctly and interpret the result without further documentation.

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?

Schema coverage is 75%, so the schema already documents `amount` (default = everything refundable), `confirm`, and `invoice`. The description reinforces the confirm gate ('Ask the person first'), but the `reason` parameter is described in neither the schema nor the description, and no amount/reason format guidance is added beyond what the schema states.

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?

States a specific verb and resource ('Open a refund', 'Starts a refund in the asset that was paid') and immediately scopes it to the paid invoice, distinguishing it from the read-only siblings like list_refunds. An agent knows exactly what this creates without opening the schema.

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

Usage Guidelines4/5

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

Gives a concrete precondition — 'Ask the person first, then call with confirm: true' — and instructs the agent to stop and escalate when the `sanctioned_sender` refusal occurs. It does not name an alternative tool (e.g. against cancel_invoice), but the when-to-use context is clear.

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