Skip to main content
Glama

Refund

o2c_refund
Destructive

Record money returned to the customer against an unapplied payment or credit note balance. Records the fact that money went back; actually moving it is out of scope, like every other outbound act. Bounded by the unapplied balance of the source instrument — you cannot refund what is already applied to an invoice without unwinding that application first (which does not exist yet, on purpose: reverse by credit note instead). Effects: refund recorded; source unapplied balance reduced; credit_note.status -> settled when exhausted.

Input Schema

NameRequiredDescriptionDefault
amountYesAmount returned. In cents (integer minor units) — 1250 means $12.50.
methodNoHow it went back.
referenceNoBank reference, exactly as printed.
source_idYesThe payment or credit note id.
source_typeYesWhat the refund draws down.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond them: it states that money movement is out of scope so only the fact is recorded, defines the balance ceiling, and enumerates resulting state changes (unapplied balance reduced, credit_note.status -> settled when exhausted). That is exactly the consequence disclosure an agent needs before a destructive mutation.

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 verb and resource, then constraints, then effects in a clearly labelled 'Effects:' clause. It runs slightly long and the parenthetical aside plus 'like every other outbound act' are conversational, but every sentence carries actionable content.

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?

With no output schema, the description correctly compensates by spelling out the resulting state changes, and with 100% schema coverage plus full annotation coverage the remaining burden is small. An agent has everything needed to decide and call correctly.

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 the baseline is 3, and the description earns an increment by adding a constraint the schema lacks: the amount and source are bounded by the source instrument's unapplied balance. It doesn't add format or routing detail for method/reference, but the key semantic limit is supplied.

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?

Specific verb and resource ('Record money returned to the customer') plus a precise scope qualifier ('against an unapplied payment or credit note balance'). This cleanly separates it from inbound siblings like o2c_record_payment and from application siblings o2c_apply_payment / o2c_apply_credit without needing to open 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 real eligibility rule (bounded by the unapplied balance; you cannot refund what is already applied) and routes the excluded case to an explicit alternative ('reverse by credit note instead'). It stops short of a full when-to-use enumeration against o2c_create_credit_note or o2c_record_payment, so it's strong but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.