Skip to main content
Glama

Test a refund

test_refund
DestructiveIdempotent

Refunds a test member's sandbox payment in Stripe's test mode, to prove what the app does after a refund — the same sandbox pay (from test_pay) and the same kit's guards: a test-mode key only, a test member's own payment only. payment is the Stripe reference (pi_… or ch_…) from test_pay's or test_outcome's answer; amount (minor units, below the payment's) asks a part refund — leave it out to refund in full. Nothing real is charged or returned: Stripe's sandbox only, and no payment details ever pass through this chat. The same payment refunded again answers the same refund, never a second one. Only Stripe's webhook confirms it landed — call test_outcome with as the test member's name afterwards to read it. This is what a founder may call trying a refund.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "payment": "<payment>"
    },
    "name": "test_refund"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNooptional: a part refund, in minor units (pence or cents) — leave out to refund in full
paymentYesthe payment's Stripe reference, pi_… or ch_… (from test_pay or test_outcome)

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?

Goes well beyond the annotations: it explains that no real money moves, no payment details pass through the chat, that a repeat refund on the same payment returns the same refund rather than creating a second one, and that only Stripe's webhook confirms settlement. It also states the authorization boundary (test-mode key, own payment only), which is exactly the context destructiveHint=true leaves unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded correctly, but the single dense paragraph repeats the sandbox/test-mode idea three times ('Stripe's test mode', 'Nothing real is charged or returned: Stripe's sandbox only', 'sandbox payment'), and the closing line about what a founder may call adds little an agent can act on. It is informative but would benefit from trimming and separating the follow-up instruction.

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?

There is no output schema, and the description compensates by explaining that the tool's answer is not the confirmation and that test_outcome must be called to observe the settled result. Combined with the auth constraints, idempotency note, and money-safety statement, an agent has everything needed to invoke and interpret this destructive operation.

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 a baseline of 3 applies, but the description adds real meaning: `payment` is a pi_… or ch_… reference obtained from test_pay or test_outcome, and `amount` must be in minor units and below the original payment's amount. That 'below the payment's amount' constraint is not in the schema and prevents an invalid call.

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 precise verb and resource — refunding a test member's sandbox Stripe payment in test mode — and frames the goal ('to prove what the app does after a refund'). It is clearly distinguishable from a real refund and names the related sibling tools (test_pay, test_outcome) that supply or consume the payment reference.

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 concrete preconditions (test-mode key only, a test member's own payment only) and an explicit next step: call test_outcome afterwards to read the webhook confirmation. It also tells the agent to omit `amount` for a full refund. It stops short of naming an explicit alternative or a hard 'do not use when' clause, so a 4 rather than a 5.

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.