Skip to main content
Glama

create_draft_order

Create a new draft order with line items, customer, shipping, and discount details. Opens draft in 'open' status for review before confirming.

Instructions

Create a new draft order. Side effect: creates a DraftOrder in "open" status. Requires at least one line_item with variant_id or title+price for custom items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOrder note visible to staff.
tagsNoComma-separated tags.
emailNoCustomer email for the draft order.
line_itemsYesLine items to include. At least one required.
customer_idNoAssociate with an existing customer.
billing_addressNoBilling address object.
applied_discountNoDiscount applied to the whole order (value, value_type, title).
shipping_addressNoShipping address object (first_name, last_name, address1, city, ...).
Behavior4/5

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

With no annotations provided, the description carries the full burden. It explicitly discloses the side effect (DraftOrder in 'open' status) and clarifies the requirement for item types, which goes beyond the obvious 'create' action. It does not cover permissions, error behavior, or reversibility, but the core transactional side effect is transparently stated.

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?

The description is two sentences, front-loaded with the primary action, and each sentence carries essential information (side effect and prerequisite). No fluff or repetition.

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 create tool with nested objects and no output schema, the description covers the core behavior and a critical requirement. The schema handles parameter details adequately. A minor gap is not mentioning what the tool returns (e.g., the created draft order), but this is not essential and the description is otherwise complete.

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% with each parameter described, so baseline is 3. The description adds value by imposing a cross-parameter constraint: at least one line_item must contain variant_id or title+price for custom items. This clarifies the relationship between parameters that the schema alone does not convey.

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 opens with a clear verb+resource ('Create a new draft order'), which precisely states the tool's action. It also distinguishes itself from sibling draft-order tools (list, get, update, complete, send invoice) by being the creation function, and adds a useful side-effect detail (status 'open').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states a key prerequisite: 'Requires at least one line_item with variant_id or title+price for custom items.' This gives a concrete condition for use. However, it does not explicitly mention when to prefer this tool over alternatives (e.g., for updating vs. creating) or any exclusion cases, so guidance is only partial.

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/nguyennguyenit/Sapo-MCP'

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