Skip to main content
Glama

list_claude_sessions

List Claude Code session logs for a project directory, returning metadata by default and optional prompt/output snippets.

Instructions

List local native Claude Code session logs for a project directory. Returns metadata by default; prompt/output snippets are optional.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoProject directory whose Claude sessions should be listed./root
limitNo
queryNoCase-insensitive search over session id, title, transcript text, URL, and observed posture. Matching does not disclose snippets or URL values unless their include flags are enabled.
scanLimitNoMaximum recent log files to inspect for search or archive filtering. The response reports when this bound is reached.
archiveStateNoFilter the MCP-local archive catalog: active (default), archived, or all.active
includeSnippetsNoInclude title and prompt/output snippets from local Claude logs. Defaults to false for metadata-only privacy.
includeRemoteUrlsNoInclude sensitive Remote Control URL values. Defaults to false; metadata reports only whether one exists.
Behavior4/5

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

With no annotations, the description discloses key behavior: it lists local logs, returns metadata by default, and makes prompt/output snippets optional. This adds privacy-relevant context beyond a simple 'list' statement, although search/filter behavior is not described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exactly two sentences, front-loaded with the primary action, and every phrase earns its place. It does not waste words or duplicate schema fields.

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 7-parameter tool without an output schema, the description gives a high-level overview but omits important behaviors like query search, archive filtering, and scan limits. Parameter descriptions compensate partially, but the overall return shape (metadata fields) is vague.

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 description coverage is high (86%), so the description does not need to repeat parameter details. It adds a minor link between 'project directory' and cwd, and 'optional snippets' to includeSnippets. Most semantics are already in the schema.

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 uses a specific verb 'List' with a clear resource: 'local native Claude Code session logs for a project directory.' It distinguishes from siblings like get/archive/rename by indicating a bulk listing operation, and clarifies default output mode.

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?

Usage is implied by the phrase 'for a project directory,' but there is no explicit guidance about when to use this over get_claude_session or archive_claude_session. No alternatives are mentioned, leaving the selection decision to the agent.

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/SNComrade/Rail-Connector-MCP'

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