Home / Directory / Apollo GraphOS / GetSupergraphSchema

GetSupergraphSchema

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

Read the composed supergraph schema (SDL) for a graph variant, with the composition ID and any composition errors. This is the same read that `rover supergraph fetch` performs. A supergraph schema is the single schema that composition builds from every subgraph, and it carries federation directives that the API schema does not. The response holds the whole document and is not truncated, and a supergraph schema is larger than the API schema it produces. Expect the same order of size: a large federated graph exceeds 800,000 characters, roughly 200,000 tokens. A variant that is not federated has no composition result, and the tool returns null for it rather than an empty document. Provide the graph ID and the variant name.

Name on the gateway: apollo_graphos__GetSupergraphSchema.

Parameters

NameTypeDescription
graphId requiredstring
variant requiredstring

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__GetSupergraphSchema",
  "arguments": {
    "graphId": "…",
    "variant": "…"
  }
}

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

Try asking

Use the getsupergraphschema tool with graphId set to ….

More from Apollo GraphOS