Skip to main content
Glama
patrickdaj

agent-activity

by patrickdaj

tail_agent_log

Retrieve the tail of a session transcript, including timestamps, tool calls, and token usage, for debugging and cost tracking.

Instructions

Return the tail of a session's transcript, oldest-first.

session accepts a full session UUID, a unique UUID prefix, or the keyword "latest". By default "latest" excludes the session currently calling this tool (so it never tails its own still-being-written log); pass include_current=True to opt in. Returns up to limit entries (default 100, max 1000) in chronological order. Each entry reports its type and timestamp; assistant entries list any tool(s) called and, for entries carrying usage, per-entry token counts and estimated cost; tool-result entries report each result's tool_use_id and whether it was an error. If session is ambiguous (a prefix matching multiple sessions) or matches no session, returns a structured {"error": ...} dict instead of raising. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sessionYes
include_currentNo
Behavior5/5

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

No annotations, so description carries full burden. Discloses read-only nature, error handling (returns dict instead of raising), default/max limit, chronological order, parameter behavior (prefix, 'latest', self-exclusion), and return format details. Comprehensive.

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?

Well-structured, starting with purpose then detailing parameters and error handling. Each sentence adds value, but length is appropriate for the complexity. Slightly verbose but no wasted words.

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?

Given no annotations and no output schema, description covers input, behavior, error handling, and return contents. Includes safety note (Read-only) and all parameter nuances. Fully sufficient for an agent to use 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 has 0% description coverage, so description compensates fully. Describes session parameter (UUID, prefix, 'latest', default behavior), limit (default 100, max 1000), and include_current (opt-in). All three parameters are clearly documented.

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?

Clearly states the tool returns the tail of a session transcript oldest-first. Distinguishes from siblings: list_recent_sessions lists sessions, summarize_tool_calls summarizes calls, while this tool specifically retrieves transcript entries.

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

Usage Guidelines4/5

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

Explains when to use (get recent log entries) and special behavior like 'latest' keyword and exclusion of current session. Implicitly differentiates from siblings but could be more explicit about when not to use or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/patrickdaj/agent-activity-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server