Get gateway stats
gateway_statsGet gateway stats
What the gateway did over the last 24 hours (per hour) or 7 days (per day), from the request log: requests (a refused one counts its repeats), p95 latency, the error rate, the cache hit rate and how many requests were blocked; then each routing rule's count over the range and per bucket: fell back, retried (and how many retries), answered from cache (savedUsd: what the hits would have cost at the model's average price), rate limited, refused as not allowed, timed out, and the split per model. The same numbers as the console's gateway page.
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": {
"name": "<name>"
},
"name": "gateway_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The gateway's name. | |
| range | No | The last 24 hours (per hour) or the last 7 days (per day). | 24h |