Skip to main content
Glama

Frontman for WordPress

wc_create_order_refund

Destructive

Creates a refund for a WooCommerce order. api_refund can request a payment-gateway refund and api_restock can change stock. Do not retry blindly after failure or a lost response; inspect the order and refunds first. Mirrors woocommerce-mcp-server method create_order_refund using local WordPress authentication; no WooCommerce REST API keys are required.

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": {
      "site_id": "<site_id>",
      "orderId": "<orderId>",
      "refundData": "<refundData>"
    },
    "name": "wc_create_order_refund"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderIdYesThe order ID.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
refundDataYesRefund fields to create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent, and the description adds real context on top: that api_refund triggers a payment-gateway refund, that api_restock mutates stock, that retries after a lost response are dangerous, and that it authenticates via local WordPress rather than REST API keys. That is exactly the kind of side-effect and auth disclosure a mutation tool needs.

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?

Three sentences, front-loaded with purpose then behavior then safety, with no filler. The closing sentence about mirroring the woocommerce-mcp-server method and local auth is useful but is the least essential part of the definition.

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?

Strong on safety and auth, but the highest-risk unknown remains unaddressed: what fields belong in refundData (amount, reason, line items, partial refunds). With no output schema and an opaque nested object, the description should at minimum sketch the refund payload or point to a tool that reveals it.

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% for the top-level parameters, so the baseline is 3. The description earns above baseline because refundData is an open-ended object whose schema conveys nothing ('Refund fields to create'), and the description supplies the meaningful field-level behavior (api_refund, api_restock) that the schema lacks.

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?

Opens with a specific verb+resource: 'Creates a refund for a WooCommerce order.' The create/read/delete distinction against the sibling refund tools is self-evident, and the description further scopes it by naming the optional gateway-refund and restock side effects.

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 operational guidance: do not retry blindly after a failure or lost response, inspect the order and refunds first. It also explains what the api_refund and api_restock flags do, which helps an agent choose parameter values. It stops short of an explicit when-to-use-this-vs-sibling statement (e.g., versus wc_get_order_refunds as a pre-check).

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.