Skip to main content
Glama

list_project_sessions

Retrieve saved agent conversation sessions for a project to find and resume a specific thread.

Instructions

List resumable agent conversation sessions for one project.

Queries the project's agent for sessions saved in its own store scoped to the project's cwd (filesystem scan for claude/codex/droid, subprocess call for gemini/opencode). Returns at most limit sessions sorted by most-recently-modified.

Each session dict carries id, optional title, optional bounded preview, optional created / modified (ISO 8601), and optional turns. preview is a short best-effort snippet from the session contents (often the first recognizable user message, or a backend's own title-like summary) so callers can distinguish threads without resuming them. Use the returned id with dispatch(session_id=...) to resume a specific thread as a one-shot — the agent's own resume-latest mechanism picks the just-used session up for subsequent default dispatches, so the id rarely needs to be restated.

pinned echoes the project's currently saved session_id (if any) so the orchestrator can mark it in UI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries full responsibility and delivers richly. It discloses the storage retrieval mechanism (filesystem scan vs subprocess), sorting order, limit behavior, the shape of returned session dicts (including preview as a best-effort snippet), and the pinned field behavior. This goes well beyond what an input schema could convey.

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 appropriately sized, with the core purpose stated first, then mechanism, then return fields and usage guidance. Each sentence adds value, though some detail (e.g., the exact backend names) could be trimmed without losing essential meaning. It is well-structured and front-loaded.

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 listing tool with an output schema, the description covers everything needed to call it correctly: purpose, scoping, limit, return field semantics, and how to use the result with dispatch. It does not mention error cases or permissions, but these are not critical for a read-only list operation and are absent from annotations as well. The description is complete for an agent to invoke it correctly.

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 0%, so the description must explain parameters. It explicitly explains limit's effect ('at most limit sessions') but does not directly define the required 'name' parameter beyond the implicit 'for one project'. Since name is required and not self-explanatory (could be a project ID or path), the description could be clearer. It partially compensates but leaves a gap.

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 resumable agent conversation sessions for a project, with a specific verb (list) and resource (sessions). It differentiates from siblings by focusing on resumable sessions scoped to a project's cwd, distinguishing it from dispatch (which resumes sessions) and list_projects. The purpose is unmistakable and non-tautological.

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 returned id with dispatch, and mentions the resume-latest mechanism, giving context on how this tool fits into the workflow. However, it does not explicitly name alternatives or state conditions for when to use this tool instead of others like dispatch_history or project_status. It provides usage context but not explicit exclusions.

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