Plan a sync
plan_syncBuild a dry-run plan that makes a target Shopify store match a source store or snapshot, showing creates, updates, conflicts, and warnings without writing anything before apply_plan.
Instructions
Build a dry-run plan that would make the target store match the source (a store or a "dir:" snapshot folder) for the selected resources. Reads both sides and writes nothing. Returns { plan_id, expiresAt, totals (create, update, conflict), byResource, ops, warnings, filesToUpload, onlyInTarget, targetWritable, targetProtected }; each op has a seq number, key, action, reason, missing references and field changes (the first 200 ops are listed). Conflicts are items that can't be written, with the reason; items only in the target are listed and never deleted. Show the plan to the person, then pass plan_id to apply_plan; it expires after one hour, and get_plan shows it again. To only look at differences, use diff_stores instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"target": "<target>"
},
"name": "plan_sync"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prices | No | products: include variant prices and compare-at prices in what is read, compared and planned. Off by default, since prices usually differ per store. | |
| source | Yes | Store alias, or "dir:<path>" for a snapshot folder made with export_snapshot. | |
| target | Yes | Store alias the plan would write to (see list_stores; snapshot folders can't be a target). | |
| exclude | No | Drop keys matching any of these globs. | |
| include | No | Only keys matching one of these globs, e.g. ["PRODUCT.custom.*", "faq/*", "fr:*"]. | |
| locales | No | Limit translations to these locales, e.g. ["fr", "de"]. Default: every non-primary locale. | |
| as_drafts | No | Leave the published state out of what is compared and copied: in a plan, new pages are created hidden and new metaobject entries as drafts, and existing ones keep their state. Products are always created as drafts. | |
| inventory | No | products: include stock (the available quantity per location, matched to the target's location with the same name) in what is read, compared and planned. Off by default. Needs read_inventory and read_locations, plus write_inventory to apply: run connect again if the sign-in is older. | |
| resources | No | Resource types to include. Default: metafield_definitions, metaobject_definitions, collections, pages, shop_policies, metaobjects, menus, redirects. products, metafields and translations are opt-in. | |
| namespaces | No | Limit metafield values (metafields) to these namespaces. | |
| owner_types | No | Metafield owner types. For metafield_definitions, default: PRODUCT, PRODUCTVARIANT, COLLECTION, CUSTOMER, ORDER, DRAFTORDER, COMPANY, COMPANY_LOCATION, LOCATION, MARKET, PAGE, BLOG, ARTICLE, SHOP. For metafield values (metafields): PRODUCT, COLLECTION, PRODUCTVARIANT, SHOP (all by default). | |
| include_reserved | No | metafield_definitions: also compare Shopify-reserved ones (namespace "shopify", the category metafields that drive storefront filters). Compared only: a plan reports them as conflicts and never writes them. | |
| metaobject_types | No | Limit metaobjects to these types. Default: all non-reserved types. |