Skip to main content
Glama

get_ai_runtime_metrics

Read-only

Retrieve read-only AI runtime health metrics over a selected time window to monitor agent executions, p95 latencies, token use, tool failures, MCP errors, and Now Assist usage.

Instructions

AI runtime health over a time window: AI agent executions by agent and state with average duration, LLM tokens and p95 latencies (sn_aia_execution_plan), agent tool calls and failures (sn_aia_tools_execution), slowest agents from the p95 report metrics (sn_aia_report_metric), MCP server calls and errors (sn_mcp_execution_logs, sn_mcp_usage_job_history), Now Assist usage and assists (sys_gen_ai_usage_log, sys_gen_ai_log_detail), agent performance events (sn_aia_perf_event) and A2A traffic (sn_aia_external_agent_exec_history). Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_ai_runtime_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLook back this many days (default 30, max 365)
agentNoOnly executions of agents whose name contains this text
limitNoMax rows per list (default 15)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the trailing 'Read-only' is redundant rather than additive. What the description does add is the aggregation surface — naming the eight source tables shows the query spans multiple systems and is likely heavy, which is useful behavioral context. It still omits return shape, whether results are aggregated or raw rows, and any cost/timeout caveats.

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

Conciseness3/5

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

Front-loaded with the purpose, which is good, but the single dense sentence is padded with parenthesized table names (sn_aia_execution_plan, sn_mcp_usage_job_history, etc.) that give an agent little actionable value. The trailing 'Read-only' duplicates the annotation and could be dropped.

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

Completeness2/5

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

There is no output schema, and the description does not describe the response structure — whether it returns one object per metric group, a list keyed by agent, or per-list truncation at limit. For a tool aggregating eight source tables with zero required parameters, the agent cannot anticipate what comes back or how large it will be.

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%, so days, agent, and limit are already fully documented including defaults and the 365 max. The description adds nothing parameter-specific (e.g., that limit applies per list, or how the window interacts with the p95 report). Baseline 3 applies when the schema carries this load.

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

Purpose4/5

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

States a specific resource and scope: 'AI runtime health over a time window,' then enumerates the concrete metric families (agent executions by state with duration, LLM tokens, p95 latency, tool calls/failures, MCP server errors, Now Assist usage, A2A traffic). This is clearly a broad aggregate-health endpoint rather than a single-record getter, though the width of the enumeration makes the primary object ('runtime health') less crisp than a single verb+resource statement.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no routing to alternatives, even though siblings like get_ai_usage, list_ai_agent_executions, and get_ai_agent_execution cover overlapping ground. The agent must infer that this is the aggregate/dashboard tool and those are the drill-down tools; nothing in the text says so.

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

Deploy Server

Other Tools