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 ones entirely, so retrieve current items before updating.

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?

Discloses the critical behavioral nuance that lineItems replaces entirely, and states no payment triggering. Lacks permissions/rate limits, but with no annotations, the description carries the burden well.

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?

Four sentences with zero fluff. Front-loaded with the main action, then critical behavioral note, then exclusions, then usage tip. Every sentence adds essential information.

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?

Covers all key aspects: purpose, constraints (OPEN only), behavioral warning (lineItems replace), exclusion of completed drafts, and guidance on pausing. No output schema needed for this context.

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?

Input schema has 100% description coverage, so baseline is 3. The description adds extra guidance for lineItems (e.g., read current items first) and reiterates constraints, providing value 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 it modifies existing OPEN draft orders, specifying fields (customer, email, note, tags, line items) and contrasting with completed drafts. This distinctively differentiates from sibling tools like create_draft_order and complete_draft_order.

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?

Explicitly says when to use (OPEN drafts) and when not to (completed drafts), provides alternatives (use order tools for real orders), and gives guidance on pausing drafts without triggering payment.

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