Skip to main content
Glama

Refund an order

refund_order
Destructive

Refunds an order, in full or amount, once the owner approves the money on approve_url; confirm_token then gives its status.

Input Schema

NameRequiredDescriptionDefault
siteYes
amountNoSmallest unit (default all)
item_idYes
messageNoA note for the customer
restockNoPut stock back (default true)
plugin_idYes
confirm_tokenNo

Output Schema

NameRequiredDescriptionDefault
approve_urlNo
agent_messageNo
confirm_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / agent_message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / approve_url
      Added value: +{
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • removedInput schema / properties / item_id / description
      Removed value: -"From get_lists"
    • removedInput schema / properties / plugin_id / description
      Removed value: -"From list_plugins"
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "confirm_token": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The description adds real value by disclosing the asynchronous owner-approval step and status token, but omits practical behavior such as what happens if approval is never granted or whether an approval expires.

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?

One front-loaded sentence with the operation stated first and the workflow caveat second; no filler. It is dense but not padded, though 'in full or amount' reads slightly awkwardly and references approve_url, which is not a parameter.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the approval flow is surfaced. Still, for a destructive money-moving tool the description leaves the required identifiers and the approval lifecycle vague, which is the main remaining hole.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 43%, and the description compensates for just two fields: amount (full vs. partial) and confirm_token (status lookup). The three required identifiers site, plugin_id and item_id are explained nowhere, which is a material gap for an agent constructing a call.

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 ('Refunds an order') plus the scope nuance of full vs. partial amount. It does not distinguish itself from the closely related siblings fulfil_order and refuse_order, leaving the agent to infer the boundary.

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 a concrete precondition — the refund only resolves once the owner approves the money on approve_url — and explains what confirm_token is for. It says nothing about when to prefer this over refuse_order or fulfil_order, so no explicit alternative routing.

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