Skip to main content
Glama

update_draft_order

Modify an open draft order's customer, email, note, tags, or line items. Line items replace existing items entirely—read current items first to preserve them. Cannot update completed drafts.

Instructions

Modify an existing OPEN draft order's customer, email, note, tags, or line items. Important: if lineItems is provided, it REPLACES the existing items entirely (not a merge or append) — read the current items first if you need to preserve any. Cannot update completed drafts; those are real orders. To pause and pick up a draft later, leave it OPEN and re-invoke update later; nothing here triggers payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGID of the draft order to update. Cannot update completed drafts (those are real orders — use the order tools).
lineItemsNoIf provided, REPLACES the entire current line-items array — this is a replace, not a merge. To add or remove specific items you must read the current items first and resubmit the full set.
customerIdNoNew customer GID to attach. Pass to swap or set the customer.
emailNoNew email for the order.
noteNoNew internal note. Replaces any prior note.
tagsNoNew tag set. Replaces existing tags entirely.
Behavior4/5

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

No annotations provided, so the description carries full burden. It discloses the critical replacement behavior of `lineItems`, the restriction to open drafts, and that payment is not triggered. However, it does not mention authorization requirements, rate limits, or other side effects like email notifications. Still, the key behavioral traits are well-covered.

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 with clear purpose, usage caveat, and behavioral note. Front-loaded with action and resource. Each sentence earns its place. Minor redundancy with schema descriptions but overall efficient.

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?

No output schema is present, but the description adequately covers the functional behavior, constraints (only open drafts), and critical replacement semantics. Lacks mention of return value or permissions, but given the complexity, it is largely complete for selecting and invoking the tool.

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 baseline is 3. The description adds value beyond schema by explicitly stating that `lineItems` replaces entirely (not a merge) and advising to read current items first. For other params like `customerId`, `email`, `note`, `tags`, the schema descriptions are sufficient, and the main description clarifies they replace existing values. This nuance elevates the score.

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 'Modify an existing OPEN draft order's customer, email, note, tags, or line items.' The verb 'modify' and resource 'draft order' are specific. It distinguishes from siblings by emphasizing 'OPEN' and contrasting with completed drafts that are real orders.

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

Usage Guidelines5/5

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

The description explicitly states when to use (open draft orders), when not to use (cannot update completed drafts, which are real orders and should use order tools). It also advises reading current line items before replacement and explains how to pause drafts without triggering payment. Nearly perfect guidance.

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/miller-joe/shopify-mcp'

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