Skip to main content
Glama

refundInvoice

Destructive

Refund a paid invoice (moves money app→payer; partial refunds accumulate up to the face amount).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoDecimal string in MAJOR units, e.g. "5" = 5 USDT. Never a float. Omit for a full refund of the remainder.
spend_idYesIdempotency key — persist before calling.
invoice_idYesThe paid invoice.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag the tool as destructive and not read-only. The description adds useful behavioral context by specifying the direction of money movement and that partial refunds accumulate up to the face amount. It does not mention idempotency or failure modes, but the spend_id schema already covers idempotency.

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 a single, compact sentence with no wasted words. The core purpose is front-loaded, and the clarifying parenthetical adds only high-value behavioral details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the detailed input schema and the destructive annotation, the description adequately covers the essential behavioral context. It does not describe the return value or error behavior, but no output schema exists and the main invocation requirements are documented.

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 fully documents all three parameters. The description adds no parameter-specific semantics beyond what the schema already states, which is acceptable per the baseline for high schema coverage.

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 names a specific verb ('Refund'), a clear resource ('a paid invoice'), and the monetary side effect ('moves money app→payer'). This clearly distinguishes it from sibling tools like deleteInvoice or createInvoice.

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?

It clearly states the intended context: refunding a paid invoice, and it notes partial refund behavior. It does not explicitly name alternative tools or exclusion conditions, but the context is clear enough that an agent can infer when to invoke it.

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.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool maps to a distinct resource or action: invoices, subscription plans, subscriptions, checks, transfers, balance, rates, and auth flows. The two-step connect/connect_status pair is clearly separated into initiate and poll, and similar actions like archiveSubscriptionPlan versus cancelSubscription are explicitly differentiated.

Naming Consistency4/5

The vast majority of tools follow a camelCase verb_noun pattern such as createInvoice, getSubscriptions, and refundInvoice. The exceptions are connect_status and get_docs, which use snake_case, creating a minor but noticeable inconsistency.

Tool Count4/5

At 21 tools, the server is on the heavier side but the breadth of a merchant payment API justifies it: auth, invoices, subscriptions, transfers/checks, balances, exchange rates, stats, webhooks, and docs all need coverage. No tools feel redundant, though a few list-only endpoints could arguably be consolidated.

Completeness3/5

Core invoice and subscription lifecycles are well covered: create, list, delete, archive, cancel, and refund. However, there is no visible createTransfer or createCheck tool even though the API includes transfers/checks docs and deleteCheck/getTransfers, leaving a notable dead end for initiating transfers.

Resources