Home / Directory / Apollo GraphOS / GetSubgraphSchema
GetSubgraphSchema
An MCP tool from the Apollo GraphOS server, run by Apollo.
Read one subgraph's published schema (SDL) from a variant, with its routing URL, revision, and last update time. This is the same read that `rover subgraph fetch` performs. Read one subgraph at a time: a whole supergraph document is much larger and can pass the token limit of the model. Provide the graph ID, the variant name, and the subgraph name. Use GetVariantDetails first if you do not know the subgraph names.
Name on the gateway: apollo_graphos__GetSubgraphSchema.
Parameters
| Name | Type | Description |
|---|---|---|
graphId required | string | |
variant required | string | |
subgraphName required | string |
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:
{
"name": "apollo_graphos__GetSubgraphSchema",
"arguments": {
"graphId": "…",
"variant": "…",
"subgraphName": "…"
}
}The first call connects Apollo GraphOS to your account automatically; nothing to set up. About this server.
Try asking
Use the getsubgraphschema tool with graphId set to ….