GetSupergraphSchema
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"graphId": "<graphId>",
"variant": "<variant>"
},
"name": "GetSupergraphSchema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| graphId | Yes | ||
| variant | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| errors | No | ||
| extensions | No |