Home / Directory / Apollo GraphOS / GetClientMetrics
GetClientMetrics
An MCP tool from the Apollo GraphOS server, run by Apollo.
Traffic broken down by client for a graph over a time window, as compact CSV. Columns: start timestamp, end exclusive timestamp, client name, client version, operation name, request count, request latency p50 ms, request latency p99 ms, request with error count. Answers which clients call a graph, which client versions are still on the wire, and which client drives errors or latency. Clients that do not report `apollographql-client-name`/`-version` come back with empty name and version columns. Ranked by `orderBy` descending: default REQUEST_COUNT (busiest); REQUEST_WITH_ERROR_COUNT for most error-prone, REQUEST_LATENCY_P99_MS for slowest. `variantName` and `operationName` scope to one or more variants or operations by exact name (omit for all). Rows are one per client + version + operation, so a busy graph has far more groups than the other metrics tools: scope by `operationName` or raise `limit` when a breakdown looks truncated. Keep the default `resolution` of ENTIRE_RANGE for totals and top-N, which gives
Name on the gateway: apollo_graphos__GetClientMetrics.
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 operation-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 operation-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 operation-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 | |
operationName | 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__GetClientMetrics",
"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 getclientmetrics tool with graphId set to ….