validate_graphql
Check a GraphQL document against a schema before you send it.
Endpoint
https://go.sessions.website/build/api/mcpWhen 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
operationstringrequiredThe GraphQL document text to validate.
schemastringrequiredWhich GraphQL schema to read: "public" (go.sessions.website/api/graphql) or "business" (the staff/admin API).
One of: public, business
variablesobjectoptionalOptional 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.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "validate_graphql",
"arguments": {
"document": "query { business(handle: \"capital-bodywork\") { nam } }",
"schema": "public"
}
}
}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.