Skip to main content
Glama

agent_activity_query

Query recent agent activity records for a team to review tool usage, durations, and I/O summaries; filter by team or agent and get compact results by default.

Instructions

Query Agent activity records for a team.

Returns recent activity log entries sorted by timestamp descending, including tool name, duration_ms, and an I/O summary.

Default response is a COMPACT projection (view="compact" + hint - trimmed, NOT missing fields): input/output summaries are excerpted because the raw output_summary often holds a whole command transcript (a 60-row window measured 43.9k chars, right at the MCP result ceiling). Full records via fields="all". The compact window is capped at 40 rows - narrow with agent_id rather than widening limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records to return, default 20 (compact view caps it at 40)
fieldsNo"compact" (default, excerpted I/O) / "all" (full records)compact
team_idNoTeam ID or name (optional, auto-uses active team if empty)
agent_idNoFilter by a specific Agent ID (optional, returns all agents if empty)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.15.0
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of records to return, default 20 (compact view\ncaps it at 50)"New value: +"Maximum number of records to return, default 20 (compact view\ncaps it at 40)"
  2. Changed2 schema fields changedv1.11.2
    • addedInput schema / properties / fields
      Added value: +{
      +  "default": "compact",
      +  "description": "\"compact\" (default, excerpted I/O) / \"all\" (full records)",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of records to return, default 20"New value: +"Maximum number of records to return, default 20 (compact view\ncaps it at 50)"
  3. First observedv1.9.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does it well: it discloses sort order (timestamp descending), the default compact projection and that excerpts are trimmed rather than missing, the concrete rationale (a 60-row window measured 43.9k chars against the MCP result ceiling), and the 40-row cap. It omits auth/rate-limit context, but the response-shaping disclosure is unusually strong.

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?

Front-loaded with the action, then structured into returns/default/escape-hatch guidance. The parenthetical about the 43.9k-char measurement is slightly over-detailed for a tool description, but it justifies the compact default and every sentence carries information.

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?

An output schema exists, so the description need not explain return values, yet it covers the key operational risks (default projection semantics, cap, how to widen). For a 4-param read tool with zero annotations, what remains missing is chiefly the when-to-use routing against sibling tools.

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 adds meaning beyond the schema: it clarifies that compact means excerpted rather than missing fields, that fields="all" retrieves full records, and that the compact window caps at 40 rows so agent_id is the preferred narrowing lever rather than limit.

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?

States a specific verb and resource — querying Agent activity records for a team — and the second sentence adds the return shape (tool name, duration_ms, I/O summary). It does not, however, distinguish itself from plausible siblings like task_execution_trace or event_list, so an agent must infer which activity surface is the right one.

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?

It gives useful operational guidance — narrow with agent_id rather than widening limit, use fields="all" for full records — which is implied when-to-use advice. But it never says when to prefer this over sibling listing/telemetry tools, and there are no explicit exclusions.

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

Deploy Server

Other Tools