Skip to main content
Glama

Last Price

refund_payment

Destructive

Mark a payment refunded: pass payment_id, and optionally amount (up to the payment amount; the whole payment otherwise) and reason. It records the refund in Last Price, and answers 400 when the payment is already refunded. Needs a claimed Last Price credential with billing write scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
amountNoHow much to refund. Defaults to the whole payment.
reasonNoWhy it was refunded.
payment_idYesThe payment: its id, as list_payments shows it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotent=false, and the description adds substantial beyond that: the refund is recorded in Last Price, a duplicate attempt returns 400, and it requires a billing write credential plus a claimed workspace. This is exactly the operational context an agent needs before mutating billing state.

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-loads the action and required parameter, then layers optional params, behavior, and auth. A single dense paragraph with no wasted sentences, though slightly packed.

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?

For a destructive, no-output-schema mutation, the description covers parameters, defaults, error codes, and auth requirements well. It stops short of describing the success response, but without an output schema that is a minor gap.

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. The description adds real meaning beyond the schema: amount is capped at the payment amount (the schema only says 'defaults to whole payment'), and payment_id is tied to list_payments output. Minor remaining gap is that 'reason' semantics aren't elaborated.

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 ('Mark a payment refunded') and immediately specifies the key parameter. Clearly distinguishable from siblings like create_payment, get_payment, and list_payments.

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 the calling context (needs billing write scope, needs claimed workspace) and the failure conditions (400 if already refunded, 403 with sandbox key). It doesn't explicitly name sibling alternatives, but the prerequisites and exclusions make the when-to-use clear.

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.

Resources