Skip to main content
Glama

List Local Agent Sessions

list_agent_sessions

Discover local AI coding sessions from Antigravity, Claude Code, and Codex by agent, title, project, or touched file, returning redacted metadata with a configurable session limit.

Instructions

Auto-discover local AI coding sessions across Antigravity (/.gemini/antigravity/brain), Claude Code (/.claude/projects), and Codex (~/.codex/sessions) with redacted metadata.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_agent_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentNoFilter by agent: all (default), antigravity, claude, codex
limitNoMaximum sessions to return (default 25)
queryNoFilter by title, session ID, project, or touched file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two useful behavioral facts: the tool scans the local filesystem at specific paths, and returned metadata is redacted. It stops short of stating that the operation is read-only, how expensive a multi-directory scan might be, or what a session record contains beyond redacted metadata.

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?

A single front-loaded sentence that packs the action, the source list, and the redaction caveat without filler. The parenthetical paths are slightly bulky but they materially define scope, so almost every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, zero-required discovery tool with no output schema and no annotations, the description covers sources and redaction but leaves the return shape, read-only nature, and selection guidance unstated. Adequate to invoke correctly, but an agent still has to guess at result structure and cost.

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

Parameters3/5

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

Schema coverage is 100% with per-parameter descriptions and an enum, so the baseline is 3. The description does add light context by naming the three concrete agents that the 'agent' enum selects among, but it says nothing about 'limit' or 'query' semantics beyond what the schema already provides, and the 'custom' enum value is never explained.

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?

Names a specific action (auto-discover) and resource (local AI coding sessions), and enumerates the concrete sources: Antigravity, Claude Code, and Codex with their paths. It clearly reads as a discovery/listing tool rather than a deep-inspection tool, so an agent can distinguish it from inspect_agent_session, though it never explicitly contrasts itself with the similarly named app_list_sessions sibling.

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?

"Auto-discover" implies the browse-then-inspect workflow, and the enumeration of agents signals a broad sweep across providers. However, there is no explicit when-to-use or when-not-to-use statement, no mention of how this differs from app_list_sessions, and no guidance on proceeding to inspect_agent_session after finding results.

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