Skip to main content
Glama

live_analytics

Read-only

Read live KPI dashboard data from the tracing store to monitor volume, cost, latency, error rate, agent/channel breakdowns, and top tools.

Instructions

Live KPI dashboard data (read from the tracing store): volume, cost, latency percentiles, error rate, per-agent/channel breakdowns, top tools. Same payload as /admin/live/analytics.json. hours is clamped to [1, 8760]; status must be success | error | '' (both = no filter). trace_env (dev|staging|prod|'') scopes to traces tagged with that environment — unlike env elsewhere, this isn't restricted to staging|prod since traces can carry a dev tag too (environment is the deprecated alias). With tracing off (no tracing store configured) the numbers are empty and notice says so. The per-bucket time series (series, buckets) is dropped unless include_series=true — the totals and breakdowns answer most questions and the series is the bulk of the payload.

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": "live_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoLook-back window in hours (clamped to 1-8760).
statusNosuccess | error | '' (both).
channelNoOnly traffic from this channel slug.
trace_envNoEnvironment tag of the traces to scope telemetry to (dev|staging|prod); '' = all environments.
agent_kindNoOnly this agent kind.
environmentNoDEPRECATED alias of trace_env.
include_seriesNoInclude the per-bucket time series (large).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond readOnlyHint=true, it discloses clamping of hours, that '' status means no filter, the deprecated environment alias, the dev-tag exception for trace_env versus env elsewhere, the payload-size behavior of series, and the empty-results-plus-notice behavior when no tracing store is configured. These are exactly the non-obvious traits an agent needs before calling.

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?

It is front-loaded with the resource and metric list, then parameter caveats, then the output-shaping note. Dense but every sentence carries information; the trace_env sentence is slightly convoluted with the parenthetical alias note but not wasteful.

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 an output schema present, the description needn't document return shape, yet it still explains the two behaviors an agent would otherwise get wrong: series omission by default and empty results under disabled tracing. For a 7-parameter read-only analytics tool this is complete.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by adding cross-tool meaning the schema cannot: trace_env accepts dev while env elsewhere is staging|prod only, and that environment is a deprecated alias. The include_series payload-cost framing also adds decision value beyond 'Include the per-bucket time series (large).'

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?

The opening sentence gives a specific verb (read) and resource (live KPI dashboard data from the tracing store) and enumerates the metrics returned: volume, cost, latency percentiles, error rate, per-agent/channel breakdowns, top tools. It does not explicitly name a sibling such as caching_analytics to contrast with, so sibling differentiation is inferred from scope rather than stated.

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

Usage Guidelines4/5

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

It gives real usage guidance for the key decision point: the time series is dropped unless include_series=true because 'the totals and breakdowns answer most questions and the series is the bulk of the payload.' It also tells the agent what happens when tracing is off. It stops short of explicit when-to-use-this-vs-another-tool routing, but the context is clear.

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