Skip to content

validate_graphql

Check a GraphQL document against a schema before you send it.

No authentication

Endpoint

endpoint
https://go.sessions.website/build/api/mcp

When to use it

  • Before sending a generated document to the real endpoint — this catches the mistake without spending a request.

  • When a query is failing and you want the error with a line and column rather than a server message.

Parameters

operationstringrequired

The GraphQL document text to validate.

schemastringrequired

Which GraphQL schema to read: "public" (go.sessions.website/api/graphql) or "business" (the staff/admin API).

One of: public, business

variablesobjectoptional

Optional variables (currently unused by validation).

Returns

Either a confirmation that the document is valid against the chosen schema, or each error with its line and column and what it expected.

Example

POST this to the endpoint above.

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "validate_graphql",
    "arguments": {
      "document": "query { business(handle: \"capital-bodywork\") { nam } }",
      "schema": "public"
    }
  }
}
content
1 error:
- 2:48 Cannot query field "nam" on type
  "Business". Did you mean "name"?

What the agent is told

The description the model reads when deciding whether to call this. It is the only thing that decides whether the tool fires at the right moment, so it is worth knowing what it says.

validate_graphql
Parse and validate a GraphQL operation against the public or business schema. Returns "valid" or actionable syntax/validation errors with line and column. Does not execute the operation.

See also