Read Gate operational metrics
gate_metricsReturns project-wide 24-hour call aggregates, anomaly scores, idle apps and current-month usage; use it for operational trends rather than individual calls in gate_audit or one run in gate_run_timeline. Includes stored call counts by HTTP status and reason, measured duration through response headers (including upstream wait), per-app anomaly scores and 24-hour anomaly counts, idle apps (active apps whose key made no allowed call in the project's idle_days, default 14; a flag only, never a revoke), and separate current-month gateway usage: plan, used, allowed, plus upgrade URL and checkout path on Free at 80% or above. Only POST the checkout path when the admin asks to upgrade; reading metrics never starts checkout. Requires the project owner key or an active member key. Audit may be partial: invalid-key sampling and audit-off periods are disclosed. No upstream requests, quota use or policy changes; not a health certificate or performance guarantee. For individual calls use gate_audit.
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": {
"project_id": "<project_id>",
"admin_key": "<admin_key>"
},
"name": "gate_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| admin_key | Yes | The project admin key (ga_...). Read it from the .env; never print it. | |
| project_id | Yes | The project id from gate_create_project, e.g. p1a2b3... |