Skip to main content
Glama

Get chatbot statistics

get_chatbot_analytics
Read-onlyIdempotent

Get chatbot statistics

Returns the lifetime aggregate metrics of one chatbot: session counts, durations, cost, token consumption and quality scores. The figures are read live from the conversation records and count a chat session and a spoken widget conversation alike, so the fields are named after calls even though most entries are chat sessions; the two call-length extremes tracked for voice agents are absent. Cost is in USD, as the voice engine reports it. A chatbot with no recorded activity yet answers 200 with stats set to null. A chatbot 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": {
      "chatbotId": "<chatbotId>"
    },
    "name": "get_chatbot_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatbotIdYesNumeric identifier of the chatbot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: figures are read live from conversation records, chat and spoken-widget sessions are both counted, fields are named after calls despite most entries being chat, voice-agent call-length extremes are absent, cost is USD per the voice engine, empty chatbots return 200 with stats=null, and cross-account access returns 404. This is unusually rich disclosure of non-obvious behavior.

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 one dense paragraph but front-loaded with what it returns, then semantics, then error behavior — a sensible order. A few clauses are wordy (the naming-after-calls aside), but each carries information the agent cannot get from the schema or annotations.

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?

There is no output schema, so the description carries the full burden of describing the return payload, and it does: session counts, durations, cost, token consumption, quality scores, plus the null-stats empty case. Combined with the 404/400 semantics, an agent has everything needed to call and interpret this tool correctly.

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 already 100% for the single chatbotId parameter, so the baseline is 3; the description adds real meaning beyond the schema by explaining that an ID belonging to another account returns 404 indistinguishable from a nonexistent one, and that a non-numeric path segment returns 400. That is genuine semantic value about identifier validity and ownership scoping.

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 opens with a specific verb+resource ("Get chatbot statistics") and immediately narrows scope to "lifetime aggregate metrics of one chatbot," which distinguishes it in practice from daily/summary analytics siblings by time horizon and entity. It stops short of naming any sibling explicitly, so it earns a 4 rather than a 5.

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 implied by the 'lifetime aggregate' framing, but there is no explicit when-to-use statement or pointer to alternatives such as get_daily_analytics or get_analytics_summary for time-series data. The error-case notes help the agent handle outcomes, not choose the tool.

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.