Skip to main content
Glama

Get agent statistics

get_agent_analytics
Read-onlyIdempotent

Get agent statistics

Returns the lifetime aggregate metrics of one voice agent: call counts, durations, cost, token consumption and quality scores. The figures are read live from the conversation records, so a call is counted as soon as it has ended. Cost is in USD, as the voice engine reports it. An agent that exists but has no recorded activity yet answers 200 with stats set to null. An agent that does not belong to the calling account answers 404, the same as one that does not exist; a path segment that is not a number answers 400.

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": {
      "agentId": "<agentId>"
    },
    "name": "get_agent_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentIdYesIdentifier of the voice agent, as `agent_42` or the bare number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

The annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial behavior beyond them: metrics are read live from conversation records, a call counts as soon as it ends, cost is USD as reported by the voice engine, an inactive agent returns 200 with stats=null, and cross-account access returns 404 indistinguishable from a missing agent. The 400-on-non-numeric-path detail rounds out the error contract.

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?

Purpose is front-loaded in the first sentence, followed by return content and then error semantics in descending importance; no sentence is filler. The only redundancy is the heading 'Get agent statistics' restating the title before the substantive sentence.

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

Completeness4/5

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

There is no output schema, so the description must carry the return contract — and it does name the metric families, the null-stats case, and the currency. It stops short of describing the shape of the stats object or whether per-metric fields are always present, which leaves a modest gap for a tool with no output schema.

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 coverage is 100% for the single agentId parameter and already documents the 'agent_42 or bare number' format, so the schema carries the load. The description only indirectly touches the parameter via the 400 'path segment that is not a number' note. Baseline 3 applies when the schema is fully documented.

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 description gives a specific verb and resource ('Returns the lifetime aggregate metrics of one voice agent') and enumerates the metric families: call counts, durations, cost, tokens, quality scores. The phrase 'one voice agent' quantifies the scope versus an account-wide summary, though it never names a sibling tool explicitly.

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

Usage Guidelines3/5

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

Usage is only implied by the scope phrase 'one voice agent' and 'lifetime aggregate' — an agent can infer this is the per-agent drill-down, but there is no explicit 'use this instead of get_analytics_summary when...' statement. No prerequisites or exclusions are stated.

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.