Skip to main content
Glama

Run a Shopify Admin Action

shopify_run_action
Destructive

Validate and apply any Shopify Admin API mutation across up to 100 stores, defaulting to dry-run, with shared or per-store variables and incomplete-preview safeguards.

Instructions

Run any Shopify Admin API mutation on one to one hundred stores. Give a mutation name (a default document is built) or a full single-mutation document, plus variables shared by every store and/or variablesByStore (IDs differ per store). dryRun (the default) validates the document and variables against each store's API version and looks up every record ID in the variables and the document; nothing is changed. The preview says whether it is complete: targets chosen by a search, saved search, filter, or "all" flag, more than 250 IDs, or IDs that do not resolve make it incomplete, and then applying also needs acknowledgeIncompletePreview: true. dryRun false applies it; every ID is looked up again first, and IDs that do not resolve refuse the apply unless acknowledgeIncompletePreview is true. Destructive actions (delete, cancel, refund and similar) need confirm set to the mutation name. Mutations are never retried automatically. On a hosted server in per-user mode, Shopify limits this to what your own staff account may do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNo
storesYes
confirmNoFor destructive actions: the mutation name (several destructive mutations: comma-separated, in document order).
documentNoA full GraphQL document with exactly one mutation operation.
mutationNoMutation name. Required unless document is given; if both are given, the document must call it.
variablesNoVariables used for every store.
variablesByStoreNoPer-store variables by alias, merged over variables.
acknowledgeIncompletePreviewNoRequired, with dryRun false, when the targets cannot all be listed in advance (search, saved search, filter, or "all" style arguments, or more than 250 IDs) or when a named ID does not resolve at apply time. Prefer narrowing the document to explicit IDs instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint false, destructiveHint true, idempotent false, openWorld true), it discloses that IDs are re-looked-up before apply, that unresolvable IDs refuse the apply, that incomplete previews arise from search/filter/all targets or >250 IDs, that mutations are never retried automatically, and that per-user mode caps authority to the staff account. This is unusually rich behavioral detail.

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?

It is a long, dense paragraph with some run-on sentences, but it is front-loaded on the dryRun-default behavior and every clause carries operational information. Little is padding, though a bulleted structure would have aided scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, nested-object, no-output-schema tool, the description covers the mutation/document relationship, dryRun default, incomplete-preview logic, apply refusal, confirmation, retry policy, and permission scoping. It does not describe the actual result payload an apply returns, which is the remaining gap given no output schema exists.

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 75% and several parameters already carry descriptions, yet the prose adds real meaning the schema lacks: mutation names build a default document, a supplied document must call the named mutation, variables are shared across stores while variablesByStore merges per-store by ID, and confirm must equal the mutation name. It is not a full 5 because dryRun and stores syntax are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Run any Shopify Admin API mutation') and adds scope ('on one to one hundred stores'), which implicitly separates it from a single-store mutation sibling. It never explicitly names shopify_graphql_mutation, so the differentiation from that closest alternative is left for the agent to infer.

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 spells out the default mode (dryRun validates nothing is changed), the condition to apply (dryRun false), the escalation path when the preview is incomplete (acknowledgeIncompletePreview), and the extra requirement for destructive mutations (confirm set to the mutation name). These are explicit when/when-not signals an agent can act on directly.

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