Skip to main content
Glama

create_refund

Refund a settled payment in full or partially by specifying the original payment ID and provider. Returns a JSON confirmation with refund ID, status, amount, and currency.

Instructions

Executes an immediate full or partial monetary refund for a previously settled payment or charge transaction across supported payment gateways. Returns a JSON confirmation object containing the refund ID, status, refunded amount, and currency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoOptional minor unit amount to refund for partial reversals (e.g., 2500 for a $25.00 refund on a $100.00 charge). If omitted or null, a full 100% refund of the original payment amount is processed.
providerYesThe originating payment provider that processed the initial charge transaction.
paymentIdYesThe unique gateway transaction identifier of the charge to refund (e.g., "pay_N1xL5Z81bABCDE" for Razorpay or "ch_3M52pELkdjaWFaKS0ABCDE" / "pi_3M52pE..." for Stripe).
Behavior3/5

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

With no annotations, the description carries the burden. It discloses the return shape (JSON with refund ID, status, amount, currency) and mentions 'immediate' and 'full or partial'. However, it omits important behavioral context such as irreversibility, failure modes, provider-specific behavior, or required permissions, which is expected for a financial mutation tool.

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 two sentences, front-loaded with the action and scope. Every word earns its place with no redundancy, making it a model of concise documentation.

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?

The description covers the core action, full/partial refund capability, supported providers (implied), and return object. Without an output schema, the return description helps. It lacks some edge-case context like error handling or idempotency, but for a refund tool with a rich schema, it is mostly complete.

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 coverage is 100% with detailed descriptions for all three parameters, including examples and enum values. The description adds no further parameter-level detail beyond what the schema already provides, so the baseline of 3 is appropriate.

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 uses a specific verb ('Executes') and names the resource ('previously settled payment or charge transaction') with a clear action (monetary refund). It also mentions full or partial scope, distinguishing it from sibling tools like create_payment_link or get_payment_analytics.

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?

The description clearly implies when to use: to refund a previously settled payment, with immediate execution and full/partial options. It doesn't explicitly name alternatives or exclusions, but none of the sibling tools compete with this functionality, so the implied usage context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pritam825/unified-pay-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server