Skip to main content
Glama

Run an Admin GraphQL query

graphql_query
Read-only

Run read-only Shopify Admin GraphQL queries on any connected store to reach data the curated tools don't cover. Mutations are refused, so use it for safe custom reads.

Instructions

Run a read-only Shopify Admin GraphQL query on one store; mutations are refused here. Use it for anything the curated tools do not cover. Before writing an unfamiliar query, look the fields up with learn_shopify_api (api "admin") and check it with validate (api "admin"). Select pageInfo { hasNextPage endCursor } on connections. Uses the latest stable Admin API version unless api_version is set.

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_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesGraphQL query document.
storeYesNo stores are connected yet. Call connect_store first.
variablesNoGraphQL variables.
api_versionNoAdmin API version such as "2026-10". Omit for the latest stable version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotation-consistent (readOnlyHint=true) and adds real context beyond annotations: mutations are refused, the Admin API version defaults to latest stable unless api_version is set, and connections must select pageInfo { hasNextPage endCursor }. It does not mention GraphQL query-cost throttling or how partial errors are returned, which is a meaningful gap for a raw query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the read-only scope, then the routing rule, then the pre-flight steps, then the pagination requirement. No sentence is filler and the order matches how an agent would plan the call.

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?

No output schema exists, and the description compensates by covering scope, version defaults, pagination conventions, and a validation workflow. Remaining gaps are throttling/cost behavior and error semantics for a raw query endpoint, which an agent would want for arbitrary queries.

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; the description adds a bit by clarifying that api_version is opt-in and that the query targets exactly one store. It says nothing extra about how `variables` should be shaped, but the schema already documents all four parameters adequately.

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?

States a specific verb and resource ('Run a read-only Shopify Admin GraphQL query on one store') and immediately bounds it ('mutations are refused here'). That contrasts cleanly with the siblings graphql_mutation and graphql_query_all_stores without the agent needing to open any schema.

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?

Gives an explicit fallback rule ('use it for anything the curated tools do not cover') plus a concrete pre-flight workflow: look fields up with learn_shopify_api (api "admin") and check with validate (api "admin"). It also names the alternative for mutations implicitly by stating mutations are refused, so routing is unambiguous.

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