Skip to main content
Glama
@cmssy/mcp-server

@cmssy/mcp-server

Official

Refund return

refund_return
Destructive

Records a refund for a return once money is sent back at the payment provider, applying it to the order's refunds and completing the received return.

Instructions

Record a refund for a return - money already sent back at the payment provider. It counts against the order's refunds and completes a received return.

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": {
      "orderId": "<orderId>",
      "returnId": "<returnId>",
      "reference": "<reference>"
    },
    "name": "refund_return"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
amountNoMinor units. Omit to refund the returned lines' value, capped at what is left refundable
orderIdYes
returnIdYesThe return's id (get_order)
referenceYesThe payment provider's refund id; repeating it records nothing twice

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.73.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation profile is known. The description adds real value by disclosing the side effects: the refund is counted against the order's refunds and it transitions a received return to complete. It does not discuss reversibility of the recorded refund, permission requirements, or what errors arise if the return state is wrong; the idempotency guarantee lives only in the schema's reference description.

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?

Two tightly written sentences with zero filler; the semantics that matter (money already sent back, completes a received return) are front-loaded before any supporting detail.

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 five-parameter destructive mutation with no output schema, the description covers purpose, precondition, and domain side effects, which is most of what an agent needs. Remaining gaps are permission requirements and the response shape, which are minor given there is no output schema to defer to.

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?

At 60% schema coverage, the schema already documents amount (minor units, omit to refund returned lines capped at remaining refundable) and reference (provider refund id, repeat-safe) and returnId. The description adds no field-level meaning beyond the phrase tying the call to money already refunded elsewhere, so it applies at baseline.

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 ("Record a refund for a return") plus the scope that separates it from refund_order: the money was "already sent back at the payment provider," so this is bookkeeping on a return, not initiating a payment refund. It also names the state effect ("completes a received return"). It stops short of explicitly naming refund_order as the alternative for order-level refunds.

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 clear context for when to call it: only after the provider has already issued the refund, and against a received return. It does not name the sibling to use instead for refunding an order that is not a return, nor state what to do if the return has not been received yet.

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

Deploy Server

Other Tools