Skip to main content
Glama
patrickdaj

agent-activity

by patrickdaj

list_recent_sessions

Retrieve recent coding-agent sessions with details like repo, git branch, timestamps, message count, and token cost. Filter by repo substring to narrow results.

Instructions

List recent coding-agent sessions, newest first.

Discovers session logs under the configured log root (default ~/.claude/projects/) and returns up to limit sessions (default 20, max 200), most-recently-active first. Each entry includes the session id, repo/cwd, git branch, start/end timestamps, message count, schema-verification status, and a token/cost usage rollup (total tokens, estimated cost, cost status, and the main-vs-sidechain split). Pass repo to filter to sessions whose cwd/repo directory name contains that substring. Read-only; never writes to or modifies the underlying log files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Without annotations, the description fully discloses the tool's read-only nature, default behavior, and the fields it returns. It also mentions the configurable log root, providing complete behavioral context.

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 description is well-structured and front-loaded with the core purpose. While efficient, a slight rephrasing could reduce redundancy (e.g., 'newest first' repeated), but it remains clear and concise overall.

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?

For a simple list tool with an existing output schema, the description covers all necessary aspects: purpose, behavior, parameters, and read-only guarantee. It is complete and leaves no ambiguity.

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?

The description adds substantial meaning beyond the schema (which has 0% description coverage). It explains the repo parameter's filtering behavior and the limit parameter's default and maximum value, making the parameters clear.

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?

The description clearly states the tool lists recent coding-agent sessions, newest first, with specific details on log root, limit, and fields returned. It distinguishes itself from siblings (summarize_tool_calls and tail_agent_log) by its unique purpose.

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?

The description explains when to use the tool (to list recent sessions) and notes it is read-only. However, it does not explicitly mention when not to use it or provide alternatives, though the sibling tools are sufficiently distinct.

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