Home / Directory / Apollo GraphOS / LintSchema

LintSchema

An MCP tool from the Apollo GraphOS server, run by Apollo.

Lint a GraphQL schema document against the graph's lint rules and return each diagnostic's coordinate, severity level, message, rule, and source location, plus the error, warning, total, and ignored counts. This is the same check that `rover graph lint` and `rover subgraph lint` run. Nothing is published and no state changes. Provide the graph ID and the schema as SDL. Optionally provide baseSdl to report only the diagnostics that the new schema introduces against that base.

Name on the gateway: apollo_graphos__LintSchema.

Parameters

NameTypeDescription
graphId requiredstring
sdl requiredstringThe schema to lint.
baseSdlmixedThe schema to diff rule violations against, if not provided the full set of rule violations will be returned for the proposed sdl.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "apollo_graphos__LintSchema",
  "arguments": {
    "graphId": "…",
    "sdl": "…"
  }
}

The first call connects Apollo GraphOS to your account automatically; nothing to set up. About this server.

Try asking

Use the lintschema tool with graphId set to ….

More from Apollo GraphOS