Skip to main content
Glama

Refund an order

refund_order
Destructive

Refund an order from a conversation on the Shopify store, as the signed-in teammate. The workspace's approval rules apply: a refund above their limits waits for an admin, and the result says whether it ran or waits. Without an amount, everything still refundable is refunded. Repeated calls are not deduplicated: calling it again refunds again while anything is left to refund, or adds another request waiting for approval.

Input Schema

NameRequiredDescriptionDefault
amountNoIn the order's currency; omitted refunds everything still refundable.
notifyNoEmail the customer about the refund.
reasonNoWhy, for the order history.
orderIdYesThe order id, from get_conversation_orders or lookup_orders.
conversationIdYesThe Aide conversation id (`cnv_…`), from find_conversation.
requestApprovalNoAsk a teammate to approve it instead of running it now. Without it, the workspace approval rules decide: an action above their limits waits for an admin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / notify / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / notify / type
      Added value: +"boolean"
    • removedInput schema / properties / requestApproval / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / requestApproval / type
      Added value: +"boolean"
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld annotations by disclosing the approval-gating flow ('a refund above their limits waits for an admin'), the meaning of the result ('says whether it ran or waits'), and critically the lack of idempotency ('repeated calls are not deduplicated: calling it again refunds again'). That last point is exactly the kind of side-effect disclosure an agent needs before calling a destructive 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?

Four sentences, each carrying distinct load (identity/scope, approval flow, amount default, idempotency). The core purpose is front-loaded and no sentence is filler.

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 mutation with no output schema, it covers identity, approval, default amount behavior, and repeat-call effects, and hints at the response shape. It does not address failure cases (e.g., non-refundable or already-fully-refunded orders) or any partial-refund edge cases, so it is strong but not exhaustive.

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 description coverage is 100%, so the schema already documents all six parameters including amount omission and requestApproval semantics. The description reinforces the amount-omission rule but adds no syntax or format detail beyond what the schema provides, making the baseline 3 correct.

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+resource ('Refund an order') and adds real scope: the conversation context, the Shopify store, and the acting identity ('as the signed-in teammate'). It is unambiguous what the tool does, though it never explicitly contrasts itself with near-siblings like cancel_order or approve_order_action, so it falls short of a 5.

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 usage context: when to pass an amount vs omit it, when approval rules intervene, and how requestApproval changes behavior. It also warns about re-invocation. It never names an alternative tool or an explicit 'use X instead' exclusion, so it stops short of 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.