Skip to main content
Glama
Jacques-Murray

WooCommerce MCP Server

Create WooCommerce Order

woocommerce_create_order

Create an order with required line items; WooCommerce automatically calculates totals, tax, and adjusts stock. Supports guest or registered customer orders with optional payment and status.

Instructions

Create a new order with one or more line items. WooCommerce will calculate totals, tax, and stock reduction (for statuses that trigger it) automatically.

Args:

  • status: order status (default: pending)

  • customer_id (number, optional): omit for a guest order

  • payment_method / payment_method_title (string, optional)

  • set_paid (boolean, optional): mark as paid immediately

  • billing / shipping (object, optional): address fields

  • line_items (array, required): [{product_id, variation_id?, quantity}]

  • customer_note (string, optional)

  • response_format ('markdown'|'json'): default 'markdown'

Returns: The newly created order object with its assigned ID and calculated totals.

Examples:

  • Use when: "create an order for 2x product 55 for customer 10" -> customer_id=10, line_items=[{product_id:55, quantity:2}]

Error Handling:

  • Returns "Error: Bad request (400)" if a product_id/variation_id doesn't exist or is out of stock with backorders disabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoInitial order status (default: pending)pending
billingNo
set_paidNoIf true, mark the order as paid immediately
shippingNo
line_itemsYesProducts to include on the order
customer_idNoExisting customer ID to attach this order to (omit for a guest order)
customer_noteNoNote left by/for the customer
payment_methodNoPayment method ID, e.g. 'bacs', 'cod', 'stripe'
response_formatNoOutput format: 'markdown' for human-readable text or 'json' for machine-readable structured datamarkdown
payment_method_titleNoHuman-readable payment method label
Behavior4/5

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

The description adds significant behavioral context beyond annotations: automatic totals/tax/stock reduction, error responses for invalid products or stock issues, and the effect of `set_paid`. Annotations declare readOnlyHint=false, which aligns with mutation, and the description elaborates on side effects.

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?

The description is well-structured with an 'Args' section and examples. It is front-loaded with the main purpose. However, it includes a full parameter list that partially duplicates the schema, making it somewhat verbose. Still, it is clear and efficient overall.

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?

Given the complexity (10 parameters, nested objects, no output schema), the description covers creation behavior, return format (order object with ID and totals), error handling, and example usage. It is sufficiently complete for an agent to use the tool correctly.

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?

With 80% schema description coverage, the baseline is 3. The description adds value by clarifying the `customer_id` parameter ('omit for a guest order'), the structure of `line_items`, and the `response_format` options. It also explains the `set_paid` boolean effect, enhancing understanding beyond the schema.

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?

The description clearly states 'Create a new order with one or more line items,' which is a specific verb-resource combination. It distinguishes from sibling tools like update, delete, get orders, and other WooCommerce tools.

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?

The description provides clear context with examples and error handling scenarios (e.g., missing product, out of stock). It explains automatic calculations and stock reduction. However, it does not explicitly exclude situations where other tools might be preferred, such as using update_order for modifications.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jacques-Murray/woocommerce-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server