Skip to main content
Glama

update_order

Update existing Sapo orders by modifying tags, notes, custom attributes, email, and marketing consent. Enables in-place corrections without recreating transactions, preserving history and inventory.

Instructions

Update an existing order via PUT /admin/orders/{id}.json. Supports: tags, note, note_attributes, email, buyer_accepts_marketing. Verified live 2026-05-01. NOTE: The customer link CANNOT be changed via Private App — Sapo silently ignores customer/customer_id fields on update (no error, no effect). Workarounds for tracking customer on a completed order: (a) tag it — tags: "customer:<id>" (searchable via search_orders); (b) set email — email: <customer.email> (Sapo may auto-match in some reports). For a true DB-level link, use the Sapo admin web UI or wait for OAuth Partner App support. Do NOT cancel + recreate via draft_order to "fix" the link — that loses transaction history, refunds, and inventory state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoOrder note. Pass null to clear.
tagsNoComma-separated tags. Empty string clears all tags.
emailNoCustomer email on the order. Pass null to clear.
order_idYesOrder ID to update. Required.
note_attributesNoCustom name/value pairs attached to the order.
buyer_accepts_marketingNo
Behavior5/5

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

The description discloses a critical behavioral quirk: Sapo silently ignores customer/customer_id fields on update with no error or effect. It also warns about destructive consequences of cancel+recreate, and includes a 'Verified live 2026-05-01' note. This goes well beyond what the schema or annotations (none provided) would convey.

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 and front-loaded with the core purpose and supported fields. It gets slightly longer due to the important caveat and workarounds, but every section earns its place. The 'Verified live' line could be seen as optional, but it adds confidence, so the length is justified.

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 tool's complexity (a silent failure and alternative workarounds), the description covers the essential context comprehensively. Without an output schema, it does not explicitly mention the return value, which is a minor gap, but the update operation's response is likely predictable for an agent familiar with Shopify/Sapo APIs. Overall, it is complete enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high (83%), but the description adds essential meaning by explaining that the customer link cannot be changed and providing concrete workaround examples like `tags: "customer:<id>"` and setting email. This clarifies behaviors not represented in the schema, e.g., how to tag or use email to track customers.

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?

Clearly states 'Update an existing order via PUT /admin/orders/{id}.json' with a specific verb and resource, and enumerates supported fields. It distinguishes itself from sibling tools like update_draft_order by explicitly warning against cancel-and-recreate via draft_order, reinforcing its specific role.

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?

Provides explicit usage context: it is for updating existing orders, and includes a strong when-not-to-use directive ('Do NOT cancel + recreate via draft_order') with reasoning about data loss. It also offers workarounds for tracking customers, guiding the agent on alternative approaches when the primary operation isn't suitable.

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