Skip to main content
Glama

Change an order's status

wp_wc_update_order_status
Destructive

Update a WooCommerce order to a valid shop status, optionally adding a private order note. Unknown statuses are rejected with the list of supported statuses.

Instructions

WooCommerce: set one order to one of the statuses this shop knows (processing, completed, on-hold, cancelled, refunded, … plus any a plugin registers); an unknown status is refused, with the list of known ones. Only the status changes: no payment is touched and no money moves, but WooCommerce reacts as in the order screen (status e-mails, stock handling, whatever plugins attach to the transition), and "refunded" makes it record a full refund of what is still unrefunded (wc_order_fully_refunded), which shows in the shop's reports. A note is added as a private order note of its own, beside WooCommerce's transition note, on every call that carries one, also when the status was already set. Returns updated, id, status and status_unchanged; an unknown order is a not-found error. Needs manage_woocommerce and the right to edit this order (edit_shop_order), which a site can withhold for single orders; no undo point is recorded. Requires WooCommerce.

Input Schema

NameRequiredDescriptionDefault
idYesOrder id, as wp_wc_list_orders returns it.
noteNoOptional private order note, added as an entry of its own. Omitted: no note besides WooCommerce's own.
statusYesOne of the shop's order statuses, with or without the wc- prefix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: no payment is touched, but status e-mails, stock handling and plugin hooks fire, and 'refunded' triggers an actual full refund recorded via wc_order_fully_refunded. It also discloses that no undo point is recorded, the required capabilities (manage_woocommerce, edit_shop_order), and that the note is added even when the status is unchanged — consistent with the destructive/non-idempotent hints.

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?

Front-loaded with the core action, and every clause carries real information useful to a destructive mutation. Structure suffers slightly because nearly all detail is packed into a single dense run-on with semicolons, making it harder to scan than a short bulleted breakdown would be.

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

Completeness5/5

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

With no output schema, the description names the return fields (updated, id, status, status_unchanged) and the not-found error case. Combined with permission requirements and side-effect disclosure, an agent has everything needed to call this safely and interpret the result.

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%, so the schema already documents all three parameters, establishing a baseline of 3. The description adds genuine meaning on top: 'refunded' is not just a label but a full-refund side effect, and the note parameter behaves per-call even when the status is unchanged.

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?

States a specific verb and resource ('set one order to one of the statuses this shop knows') with explicit single-order scope, which separates it from the bulk sibling wp_bulk_update_status. An agent knows exactly what operation is being performed and on how many objects.

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: use for one order, unknown statuses are refused with the list of known ones, and the shop's full status set (including plugin-registered ones) is accepted. It does not explicitly name wp_bulk_update_status as the alternative for multi-order changes, so routing is implied rather than stated.

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