Run an Admin GraphQL mutation
graphql_mutationRun Shopify Admin GraphQL mutations against a specified store to change data. Validate the document first, confirm the target store and change, then check userErrors in the response.
Instructions
Run a Shopify Admin GraphQL mutation that changes data in one store. Confirm the target store and the change with the user before calling. Validate the document with validate (api "admin") first, look ids up in the same store (ids from another store will not resolve), and check the userErrors field of the result. Refused for read-only stores.
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>",
"query": "<query>"
},
"name": "graphql_mutation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | GraphQL mutation document. Select userErrors { field message }. | |
| store | Yes | No stores are connected yet. Call connect_store first. | |
| variables | No | GraphQL variables. | |
| api_version | No | Admin API version such as "2026-10". Omit for the latest stable version. |