Skip to main content
Glama

Link a refund

purch_link_refund
Destructive

Tie money back to the purchase it reverses. It takes back that much of the purchase's spending, in its category; it is not income. Read purch_refunds: money in that looks like money back from the same shop. Show the person and link with a reason. A refund is never more than what is left of the purchase after earlier refunds. Money back for something not on record stays income. Effects: refund row tied to its purchase; the purchase's spending reduced by it.

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy they belong together: "returned the chair".
refund_transaction_idYesThe money-in row. An existing purch_transaction id.
purchase_transaction_idYesThe purchase it reverses. An existing purch_transaction id.

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?

The description adds meaningful behavioral context beyond the annotations: the refund row becomes tied to its purchase, and the purchase's spending is reduced by the refund amount rather than treated as income. It also discloses the running-balance limit after prior refunds, which an agent needs before invoking a modifying tool.

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?

The purpose is front-loaded in the first sentence, followed by relevant limits, alternatives, and effects. There is minor redundancy between “takes back that much of the purchase's spending” and the final Effects sentence, but the overall length is justified by the constraints conveyed.

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 three-parameter mutation tool with no output schema, the description covers purpose, effects, amount constraints, alternative review via purch_refunds, and the case where money back should remain income. No critical invocation context appears to be missing.

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 description coverage is 100%, so the schema already defines all three parameters clearly. The description reinforces that the refund is a money-in row and the purchase is the transaction being reversed, but it does not add substantial parameter-level detail beyond the schema and the refund-amount limit is more behavioral than parameter-specific.

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 gives a specific verb and resource: tying a refund (money back) to the purchase it reverses. It distinguishes this from simply reading refunds by naming purch_refunds and clarifies that money back for something not on record stays income.

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?

It specifies when to link, when not to link (unrecorded money back stays income), and points to purch_refunds for identifying candidate refund rows. It also states the refund amount cannot exceed what remains of the purchase after earlier refunds, which is a clear usage constraint.

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.