Export a store's configuration to files
export_snapshotSave a store's configuration to local JSON files, one per item, ready to commit to git. Use the snapshot folder later as a source to diff or restore another store.
Instructions
Save a store's configuration to a folder on disk, one JSON file per item (sorted keys, no store IDs), ready to commit to git. dir must be new, empty, or an earlier snapshot folder (its item files are replaced); any other folder is refused. Returns a summary { dir, files, kinds } with the count per resource type, not the data; to see the data in the response use snapshot_store. Later, pass "dir:" as the source of diff_stores or plan_sync to compare against it or restore from it. Reads the store and writes only local files, never to Shopify.
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": {
"store": "<store>",
"dir": "<dir>"
},
"name": "export_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | Folder to write, inside the snapshot base folder (SYNC_SNAPSHOT_DIR, or the folder the server runs in). Must be empty, new, or an earlier snapshot folder (its item files are replaced). | |
| store | Yes | Store alias to read | |
| 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. | |
| 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. |