Skip to main content
Glama

Summarize User Activity

user_activity_summary
Read-only

Summary KPIs for ONE end user's activity over a time window: trace count, LLM calls, error rate, failed vs errored traces, sessions, total/average cost, token usage, and latency and TTFT percentiles.

An "end user" here is the person your agents serve — the user.id your SDK stamps via rius.user(...) / withUser(...) — not a Rius account. Use it when someone arrives with a complaint and an identifier: "what did user u_8f2 experience this week" is one call, and the answer is a rollup rather than a trace list you have to fold yourself.

Same read, same window and the same figures the Rius console's user page shows for that id, so a number you report and a number a human reads there are the same number. Field names match agent_traces_summary wherever they mean the same thing.

Read the Failed traces and Errored traces lines as the two different questions they are, and do not add them together or report one as "errors": a run whose ROOT span errored FAILED, while a run that errored somewhere and then recovered did not.

user_id: the end user's exact id, as list_agent_traces reports it in the user_id column — read one off a listing rather than guessing. Matched against any span of the trace, so a trace counts for this user if the user scope was open anywhere inside it, not only at the root. anonymous: summarise the traffic that carries NO end user instead. This is a real subject, not an error case: it answers "what is happening to the runs nobody attributed", and a high error rate there is worth knowing. It is the console's ?user=anonymous. Pass either user_id or anonymous, not both. workspace: optional workspace id, name, or org-name/workspace-name when the same name occurs in two of your orgs (defaults to your default; use list_workspaces to discover them). hours: lookback window in hours (default 24), used for whichever of start/end is not given. start: optional absolute RFC3339 lower bound (e.g. "2026-08-01T00:00:00Z"); overrides the hours-derived value when given. end: optional absolute RFC3339 upper bound; overrides the hours-derived value when given. filters: optional further {"field": ..., "op": ..., "values": [...]} clauses, ANDed with the user scope — the same grammar and registry as list_agent_traces. Call describe_search_catalog before guessing a key.

Example:

What did user u_8f2 experience in the last 24 hours?

{ "name": "user_activity_summary", "arguments": { "user_id": "u_8f2" } }

How has that user's week been?

{
    "name": "user_activity_summary",
    "arguments": { "user_id": "u_8f2", "hours": 168 }
}

How much of our traffic has no user attached, and is it failing?

{ "name": "user_activity_summary", "arguments": { "anonymous": true } }

What did that user's gpt-4o runs cost?

{
    "name": "user_activity_summary",
    "arguments": {
        "user_id": "u_8f2",
        "filters": [{ "field": "model", "op": "eq", "values": ["gpt-4o"] }]
    }
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
hoursNo
startNo
filtersNo
user_idNo
anonymousNo
workspaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds much more: the result is a rollup, not a trace list; it returns "the same figures the Rius console's user page shows"; matching is against any span of the trace, not just the root; and it warns against conflating Failed vs Errored traces. That is genuine behavioral context the annotations cannot carry.

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, followed by parameter docs and then four examples that each exercise a distinct path (default window, custom window, anonymous, filters). Every section earns its place for a 7-param tool, though the four worked examples plus the console-equivalence note make it longer than strictly necessary.

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, return values need not be enumerated, yet the KPI list still tells the agent what to expect. Combined with full parameter coverage, the user-scope semantics, the Failed/Errored caveat, and the sibling cross-references, an agent has everything needed to call it correctly.

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

Parameters5/5

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

Schema coverage is 0% across 7 parameters, so the description carries the full burden and does so: user_id sourcing and span-matching semantics, anonymous as a mutually exclusive alternative, workspace formats including the `org-name/workspace-name` disambiguator, hours default with its interaction with start/end, RFC3339 formats for both bounds, and the filters clause grammar with a pointer to describe_search_catalog.

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 and resource ("Summary KPIs for ONE end user's activity over a time window") and enumerates exactly which KPIs are returned. It explicitly distinguishes itself from siblings: the field names "match agent_traces_summary", the id comes from `list_agent_traces`, and the result is "a rollup rather than a trace list you have to fold yourself".

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

Usage Guidelines5/5

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

Gives a concrete when-to-use trigger ("someone arrives with a complaint and an identifier") plus a worked query phrasing. It also spells out the mutually exclusive choice ("Pass either `user_id` or `anonymous`, not both"), clarifies anonymous is "a real subject, not an error case", and routes to `list_agent_traces` / `describe_search_catalog` for adjacent needs.

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