Skip to main content
Glama

Read Gate operational metrics

gate_get_metrics
Read-onlyIdempotent

What are the project call trends and current usage? Returns 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_read_audit or one run in gate_get_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_read_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_get_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
admin_keyYesThe project admin key (ga_...). Read it from the .env; never print it.
project_idYesThe project id from project creation on the setup endpoint (/mcp/setup), e.g. p1a2b3...

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"The project id from gate_create_project, e.g. p1a2b3..."New value: +"The project id from project creation on the setup endpoint (/mcp/setup), e.g. p1a2b3..."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the bar is lower, yet the description still adds substantial context: the required credential (project owner key or active member key), that idle-app detection is "a flag only, never a revoke," that audit data may be partial due to invalid-key sampling and audit-off periods, and that the call makes no upstream requests, consumes no quota and changes no policy. It also pre-empts over-trust by stating it is "not a health certificate or performance guarantee."

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the user-facing question and the returned data before caveats, and every clause carries operational information rather than filler. It is, however, dense — the second sentence is a long run-on stacking status counts, duration measurement, anomaly scoring, idle-app semantics and billing usage — which costs some scannability for a two-parameter read tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so: status/reason counts, response-header-derived duration including upstream wait, per-app anomaly scores and 24-hour counts, idle apps, and current-month plan/used/allowed plus upgrade URL. Auth requirements, partial-data caveats and the no-side-effect guarantee round out everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for both parameters (admin_key format and .env handling, project_id format and origin), so the schema does the parameter-level work. The description contributes only the auth constraint (owner or active member key) and mentions idle_days as a project setting rather than an argument. Baseline 3 is appropriate here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with the question it answers ("What are the project call trends and current usage?") then names the concrete payload: 24-hour call aggregates, anomaly scores, idle apps, current-month usage. It explicitly contrasts itself with gate_read_audit (individual calls) and gate_get_run_timeline (one run), so an agent can separate it from siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case ("operational trends") and two named alternatives with the condition that selects each: gate_read_audit for individual calls, gate_get_run_timeline for one run. It also adds a hard boundary on the checkout path ("Only POST the checkout path when the admin asks to upgrade; reading metrics never starts checkout"), which is exactly the kind of when-not guidance that prevents misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources