Skip to main content
Glama

get_refunds

Read-only

Read refund links, the pairs of an original transaction and the transaction that refunds it. Three modes: give transactionId for the refunds of one transaction; give originalTxId and refundTxId for one link; give neither (optionally page, limit, categoryId, accountId, transactionType) to list all of them, newest page first. Each link carries both transactions with their payee. Returns { refunds } and, in list mode, { meta: { total, page, limit } }. To find rows a refund could link to, use get_refund_recommendations (review toolset).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_refunds"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoMode 3: page number, from 1 (default 1)
limitNoMode 3: refund links per page, 1 to 100 (default 20)
accountIdNoMode 3: only refunds whose original transaction is on this account
categoryIdNoMode 3: only refunds whose original transaction is in this category
refundTxIdNoMode 2: with originalTxId, read the one refund link between the two
originalTxIdNoMode 2: with refundTxId, read the one refund link between the two
transactionIdNoMode 1: every refund link that has this transaction as the original or as the refund
transactionTypeNoMode 3: only refunds whose original transaction is of this type

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Consistent with readOnlyHint=true, and it adds behavior the annotation cannot convey: list mode returns newest page first, filters only apply in mode 3, and each link carries both transactions with payees. It stops short of describing what happens if a single-mode lookup matches nothing (empty vs. error).

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?

Three sentences, front-loaded with the definition, then the mode contract, then the return shape and the hand-off to a sibling. No filler and no repetition of the schema's own field descriptions.

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 an 8-parameter tool with no output schema, it still tells the agent the response envelope ({ refunds }, and meta in list mode) and the ordering. The only omission, differentiation from get_refund_links, is a usage concern already reflected above.

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 already 100%, so baseline is 3; the description earns above that by grouping the 8 parameters into mutually exclusive modes and making clear that page/limit/categoryId/accountId/transactionType are inert outside list mode. That is genuine semantic value the flat schema cannot express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Read refund links, the pairs of an original transaction and the transaction that refunds it") and even defines the domain concept, so an agent knows exactly what it fetches. It falls short of a 5 because the sibling tool get_refund_links sounds nearly identical and the description never distinguishes the two.

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?

Explicitly enumerates the three calling modes (transactionId alone; originalTxId+refundTxId; neither plus filters) and even routes the agent to get_refund_recommendations when it needs candidate rows to link. It gives no guidance on when to prefer this over get_refund_links, leaving a real ambiguity among siblings.

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.