Skip to main content
Glama

Export a store's configuration to files

export_snapshot

Save 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

NameRequiredDescriptionDefault
dirYesFolder 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).
storeYesStore alias to read
pricesNoproducts: include variant prices and compare-at prices in what is read, compared and planned. Off by default, since prices usually differ per store.
excludeNoDrop keys matching any of these globs.
includeNoOnly keys matching one of these globs, e.g. ["PRODUCT.custom.*", "faq/*", "fr:*"].
localesNoLimit translations to these locales, e.g. ["fr", "de"]. Default: every non-primary locale.
as_draftsNoLeave 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.
inventoryNoproducts: 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.
resourcesNoResource types to include. Default: metafield_definitions, metaobject_definitions, collections, pages, shop_policies, metaobjects, menus, redirects. products, metafields and translations are opt-in.
namespacesNoLimit metafield values (metafields) to these namespaces.
owner_typesNoMetafield 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_reservedNometafield_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_typesNoLimit metaobjects to these types. Default: all non-reserved types.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.6
    • changedInput schema / properties / as_drafts / description
      Previous value: -"Leave the published state alone: new pages are created hidden and new metaobject entries as drafts, existing ones keep their state. Products are always created as drafts."New value: +"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."
    • changedInput schema / properties / inventory / description
      Previous value: -"products: also copy stock, the available quantity per location, into the target's location with the same name. Off by default. Needs read_inventory and read_locations (and write_inventory to write): run connect again if the sign-in is older."New value: +"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."
    • changedInput schema / properties / prices / description
      Previous value: -"products: also copy variant prices and compare-at prices. Off by default, since prices usually differ per store."New value: +"products: include variant prices and compare-at prices in what is read, compared and planned. Off by default, since prices usually differ per store."
  2. Addedv0.11.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations say readOnlyHint=false and openWorldHint=true, which could suggest remote mutation; the description corrects that by stating it "reads the store and writes only local files, never to Shopify." It also discloses the overwrite semantics (earlier snapshot folder has its item files replaced, other folders refused) and that the return is a summary { dir, files, kinds }, not the data. The one gap is that the summary is described but its shape is otherwise left to inference.

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?

Four sentences, front-loaded with the core action and immediately followed by the critical dir constraint and the return-value caveat. Every sentence earns its place, though the second sentence's stacked parentheticals make it dense on first read.

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?

With 13 parameters and no output schema, the description still covers the action, the risky argument's constraints, what is returned and what is not, and how the output is consumed later. Nothing an agent needs to call this correctly or to avoid surprising an existing folder is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: the acceptance rule for dir and the "dir:<path>" source convention used by diff_stores/plan_sync, which is not encoded anywhere in the schema. It does not elaborate on the filtering options (include/exclude/resources/locales), which the schema already covers well.

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?

"Save a store's configuration to a folder on disk, one JSON file per item (sorted keys, no store IDs)" gives a specific verb, resource, and output format. It explicitly distinguishes itself from snapshot_store ("to see the data in the response use snapshot_store"), so an agent can pick between the two file-vs-response variants without opening schemas.

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?

It states the preconditions for the dir argument (new, empty, or prior snapshot folder; anything else is refused) and explains the downstream workflow: pass "dir:<path>" to diff_stores or plan_sync to compare or restore. It also routes the data-in-response case to snapshot_store, so both when-to-use and the alternative are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.