Home / Directory / Apollo GraphOS / DeleteSubgraph
DeleteSubgraph
An MCP tool from the Apollo GraphOS server, run by Apollo.
Remove a subgraph from a variant and start composition, the same write that `rover subgraph delete` performs. Returns the composition errors that the removal causes. This deletes the subgraph from the variant and can break the running router. Set dryRun to true first: the response then reports the composition result that the removal would produce, including updatedGateway, and deletes nothing. Provide the graph ID, the variant name, and the subgraph name.
Name on the gateway: apollo_graphos__DeleteSubgraph.
Parameters
| Name | Type | Description |
|---|---|---|
graphId required | string | |
variant required | string | |
subgraphName required | string | |
dryRun | mixed | Do not remove the service, but recompose without it and report any errors. |
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__DeleteSubgraph",
"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 deletesubgraph tool with graphId set to ….