Dry-run: preview a write before it happens
Write tools accept dryRun: true. The preview says it was not executed. When the tool has a GraphQL document, the preview includes it. A dry-run of publish_product_to_channel reads the current product and publication from Shopify and does not publish. A dry-run of github_create_theme_pr does not call GitHub and does not open a pull request. A dry-run of upload_product_media does not call Shopify and does not upload. On the Free plan a curated preview is allowed and the write is not run. Custom-tool previews require Pro.
Why it matters
Agents are great at intent, imperfect at details. Dry-run catches the gap:
{
"tool": "create_discount",
"dryRun": true,
"input": { "title": "WEEKEND20", "type": "code", "valueType": "percentage", "value": 20 }
}
The response shows the discount document it would create, so the agent (or you) can verify before committing.
Dry-run + confirmation gate
The two features stack:
- Agent calls the tool with
dryRun: trueand sees the preview. The write is not sent. - Agent calls it for real → if that tool's confirmation setting is on, or the action is one of the four that always pause, Shopigent returns
confirmation_pending. - You approve in your AI client or on the Confirmations page. The mutation runs and is stored in the audit log.
Tools with confirmation turned off skip step 2. create_discount is one of those by default.