Home / Directory / Apollo GraphOS / GetSubgraphMetrics
GetSubgraphMetrics
An MCP tool from the Apollo GraphOS server, run by Apollo.
Top subgraphs/connectors by traffic/health for a graph over a time window, as compact CSV. Columns: start timestamp, end exclusive timestamp, fetch service name, fetch count, fetch latency p50 ms, fetch latency p99 ms, fetch with errors count. Ranked by `orderBy` descending: default FETCH_COUNT (busiest); FETCH_WITH_ERRORS_COUNT for most error-prone, FETCH_LATENCY_P99_MS for slowest. `variantName` scopes to one or more variants (omit for all). `subgraphName` scopes to one or more subgraphs by exact name (omit for all); pattern/substring matching is not supported. `clients` scopes to the fetches driven by one or more clients; omit `clientVersion` to match every version of that client, and use GetClientMetrics to discover the names a graph sees. Keep the default `resolution` of ENTIRE_RANGE for totals and top-N, which gives one row per subgraph ranked over the whole window. DAY/HOUR/MINUTE give one row per subgraph per bucket ranked within each bucket, so a window total then needs a per-subgraph sum plus a `lim
Name on the gateway: apollo_graphos__GetSubgraphMetrics.
Parameters
| Name | Type | Description |
|---|---|---|
graphId required | string | |
from required | any | The starting timestamp for the report. Must be in the format: 2025-01-01T00:00:00Z (ISO 8601). This timestamp cannot exceed your plan's field-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). |
to required | any | The ending timestamp for the report. Must be in the format: 2025-01-01T08:00:00Z (ISO 8601). This timestamp cannot exceed your plan's field-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). |
resolution | mixed | The resolution of the time groups for the report. This resolution will affect the range of times that can be used for the 'from' and 'to' timestamps: - For the MINUTE resolution, the total time between 'from' and 'to' must be no more than 1 day, and the 'from' time must be no earlier than 30 days ago. - For the HOUR resolution, the total time between 'from' and 'to' must be no more than 7 days, and the 'from' time must be no earlier than 90 days ago. - For the DAY, MONTH, and ENTIRE_RANGE resolutions, the 'from' time must be no earlier than 549 days ago (approx 18 months), and the 'to' time must be no later than 1 day ago. - These time ranges are further constrained by your plan's field-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). If these criteria are not met, this will return a REQUEST_INVALID error. |
orderBy | mixed | |
variantName | mixed | |
subgraphName | mixed | |
clients | mixed | |
limit | mixed | Maximum number of records to return (default: 100, max 10000). |
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__GetSubgraphMetrics",
"arguments": {
"graphId": "…",
"from": "…",
"to": "…"
}
}The first call connects Apollo GraphOS to your account automatically; nothing to set up. About this server.
Try asking
Use the getsubgraphmetrics tool with graphId set to ….