LiveRecoverVYG Developer Docs
MCPToolsShopify MCP

Validate GraphQL Codeblocks

Validate Shopify GraphQL against the bundled schema — offline, before any store call

validate_graphql_codeblocks

Validates one or more Shopify GraphQL code blocks against Shopify's bundled schemas through the embedded Shopify dev MCP server. It runs entirely offline — no network, no store call — and flags hallucinated or invalid fields locally, so your AI client can fix an operation before spending any Shopify API budget.

Read-only. This is the safety check to run before shopify_admin_graphql; in fact, the execute tool runs this same bundled-schema validation on every operation for you. Call learn_shopify_api first and pass its conversationId.

Parameters

NameTypeRequiredDescriptionDefault
codeblocksobject[]YesThe GraphQL code blocks to validate. Each is { content, artifactId?, revision? } — see below.
apistringNoWhich GraphQL API to validate against. Enum: admin, storefront-graphql, customer, functions_*, and more.admin
versionstringNoShopify API version to validate against, YYYY-MM (e.g. 2026-04). Omit to use the current stable version.
conversationIdstringNoConversation id returned by learn_shopify_api. Omit and one is minted for you.

Each entry in codeblocks is an object:

FieldTypeRequiredDescription
contentstringYesRaw GraphQL source, without markdown code fences.
artifactIdstringNoStable artifact id when validating a revision of an operation.
revisionnumberNoArtifact revision number (non-negative integer).

Returns

  • A validation result per code block — valid, or the specific fields/types that failed against the bundled schema.

Example prompts

Validate this Admin GraphQL query against the bundled schema before we run it
Check whether this mutation uses real Admin API fields for version 2026-04

Notes

  • api defaults to admin — the API CDP brands work with. The other enum values target storefront, customer, and Shopify Functions schemas.
  • Validation is offline and free: it uses schemas bundled with the server, so it catches hallucinated field names without touching your store or Shopify's API.
  • shopify_admin_graphql already pre-validates every operation this way before executing — running this tool yourself is a way to iterate on a draft first.

On this page