Run a GraphQL query
graphql_queryRun a read-only GraphQL query against the Shopify Admin API to fetch data other tools miss, such as variants, SKUs, inventory per location, customers, or metafields.
Instructions
Runs one read query against the store's Admin GraphQL API, for anything the other tools do not cover: variants and SKUs, inventory per location, customers, collections, discounts, fulfilments, metafields.
Only queries are accepted: a mutation or subscription is refused before it is sent. What the query may read is limited to the access scopes the store granted the app (see get_shop).
Ask for no more than you need: lists take first: N (keep it at 100 or below) and Shopify bills a query by the items it requests. Page with pageInfo { hasNextPage endCursor } and after.
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": {
"query": "<query>"
},
"name": "graphql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A GraphQL query document with exactly one query operation. | |
| variables | No | Values for the query's variables. |