Skip to main content
Glama

Get an agent's daily analytics

get_agent_analytics
Read-onlyIdempotent

Get an agent's daily analytics

The agent's activity for each UTC day from from to to, both included, at most 92 days, with the window's totals: new conversations, messages, the customers' mood as the AI reads it, conversations that turned angry, and the AI's completed actions. to defaults to today in UTC, and neither date can be later than today; today's row keeps counting. Days without activity are listed with zeros. Counts are recorded as things happen, and one that fails to record isn't retried. Every figure but new conversations is counted from the day Mojeeb started recording analytics, so days before it read zero (and no mood). Reading analytics costs no messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoThe last day of the report, a UTC date written `YYYY-MM-DD`, the whole day included. Defaults to today in UTC.
fromYesThe first day of the report, a UTC date written `YYYY-MM-DD` and nothing else (`422 invalid_request_body` otherwise).
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish the safe read profile (readOnlyHint, idempotentHint, non-destructive), and the description adds substantial non-obvious behavior: a hard 92-day window, today's row continuing to count, zero-filled days without activity, failed counts that are never retried, and metrics that read zero before analytics recording began. These are exactly the operational caveats an agent needs and cannot get from annotations or schema.

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?

The window definition, metric list, and caveats are front-loaded in a dense, well-ordered block, and every clause carries information. It loses a point for restating the title verbatim as the opening line and for a long trailing run of caveats that could be tightened.

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 by enumerating the per-day metrics (new conversations, messages, customer mood, escalated/angry conversations, completed actions) plus window totals, along with zero-fill and recording semantics. Nothing an agent needs to call or interpret the result is missing.

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, but the description goes beyond the schema by bounding both dates ('at most 92 days', 'neither date can be later than today') and stating 'both included' inclusivity semantics. It also cross-references the error behavior for agent_id indirectly through the daily-report framing, though the schema itself carries the 404/403 detail.

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?

States a specific verb (get) and resource (an agent's daily analytics) and immediately defines the shape of the returned data: per-UTC-day rows from `from` to `to` with named metrics. This clearly distinguishes it from siblings like get_agent, get_usage, and list_usage_history, which cover entity data and usage metering rather than conversation analytics.

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 rather than stated: the 92-day cap, the `to` default, and the note that reading analytics costs no messages hint at when it is appropriate to call. However, it never names an alternative (e.g. get_usage or list_usage_history) or gives an explicit when-not-to-use condition, so the agent must infer the routing.

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