Tools
Publish
One tool crosses the line from drafts to your live stores:
publish_master_v1. It runs the same server-side publish
orchestration the app uses — nothing bespoke, nothing partial-by-design.
It requires the Read, write & publish tier — pim:publish is grantable only through the browser consent flow, never through any other credential surface.
publish_master_v1
publish_master_v1pim:publish| Argument | Type | Description |
|---|---|---|
id | string, required | Item id. Must belong to the token's account; cross-account ids return "not found". |
channel_ids | string[] | Restrict the publish to these store ids (validated against the account). Omit or leave empty to publish to every store the item has a per-store version on. |
What the orchestration does
The server resolves the target stores and runs the full publish for each:
- Variant cascade — the item's variants publish with it.
- Media sync — attached media is synchronized to the store.
- Collection-membership sync — the item's collection memberships are brought in line on the store.
The assistant never orchestrates any of this itself — one call, and the server does the same work a publish from the app would.
Partial failure is reported honestly
A completed orchestration can still fail on some stores or variants. The result
then carries ok: false with per-store errors[] and
per-variant variant_results[], and the text is prefixed with a
note so it can't be mistaken for a success:
[partial failure] publish completed with errors — inspect "errors" and
"variant_results"; already-published channels are live, failed ones are not.
Already-published stores are live; failed ones are not. Fix the cause (the
per-store error says what failed), then publish again — to the failed stores
only, via channel_ids, if you like.
The 120 s timeout — and what a timeout means
Publish gets an extended 120 s budget (every other tool gets 20 s)
because it runs live Shopify mutations with the full cascade. If the call
still times out, that is not evidence of failure: the server-side
publish may complete anyway. Re-read the item — e.g. with
get_master_with_projections_v1 —
and check its publish state before retrying, so you don't publish twice on a
false alarm.
Before publishing
- Review what will go live: the drafts written by the write tools or the data-health remediation batches.
- Check where the item is visible today with the sales-channel reads if channel placement matters.
- During an import/refresh reconciliation, the account is write-locked (423) — see Security & limits.