Skip to main content
Glama

sessions_list

Find Claude Code sessions by tag, title, first prompt, or conversation text; search the current project, its subfolders, or all projects before reading one.

Instructions

Find Claude Code sessions of this project: id, title, date, tags, cwd, first prompt.

tag keeps those with that tag; query matches title, label and first prompt; contains matches any user or assistant text. all_projects searches every folder instead of this project and its subfolders. Read one with sessions_read.

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": "sessions_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
queryNo
containsNo
all_projectsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden; it discloses the search scope and its widening flag, and it lists what each result row contains, which is meaningful behavioral context for a read tool. It stops short of stating result limits, ordering, or truncation behavior, which matter for a broad 'all_projects' search.

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?

Purpose and return fields are front-loaded in the first sentence, and the remaining clauses map one-to-one onto the four parameters with no filler. The compact backticked parameter names make the mapping scannable.

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

Completeness4/5

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

For a four-parameter, zero-coverage, annotation-free listing tool this is close to complete: scope, filters, and result shape are all covered. The remaining gap is result-volume behavior (limits, pagination, ordering) when all_projects is used, which the agent cannot infer from any structured field.

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 coverage is 0%, so the description must carry all four parameters, and it does: tag, query, contains, and all_projects each get distinct matching semantics rather than names being restated. The crucial distinction between query (title/label/first prompt) and contains (any user or assistant text) is exactly the kind of meaning the schema does not provide.

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?

Specific verb plus resource ('Find Claude Code sessions of this project') with the returned fields enumerated (id, title, date, tags, cwd, first prompt). It also names the sibling that handles the single-record case ('Read one with sessions_read'), so the agent can distinguish list from read without opening either schema.

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

Usage Guidelines5/5

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

Each filter is paired with its own condition (tag filters by tag, query searches title/label/first prompt, contains searches full text), the default scope is stated as this project and its subfolders, and all_projects is explicitly flagged as the way to widen to every folder. The alternative for retrieving a single session is named outright, leaving no routing decision to inference.

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