Skip to main content
Glama

List Claude Code sessions

list_sessions

List available Claude Code sessions you can drive. Returns brief names for voice, with optional detailed info on request.

Instructions

Name the sessions you can drive. Returns one short line by default, because a voice client reads the whole result aloud. Ask for details only when the user wants them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailedNoInclude cwd, status, version and Remote Control id for each session. Verbose — omit for voice.
include_unreachableNoAlso name the sessions that cannot be messaged. They are only counted otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral transparency burden. It discloses a meaningful behavioral trait: the tool returns a single short line by default because a voice client reads results aloud. It also implies the tool is read-only and non-destructive by framing it as 'name the sessions.' It could mention edge cases like empty lists or error behavior, but the disclosed voice-optimization behavior is valuable.

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?

Two tight sentences. The first states the core purpose immediately, and the second explains the default behavior and the condition for requesting details. No wasted words.

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?

The tool is simple (two optional booleans, no output schema), and the description explains the default output style and when to deviate. It doesn't cover every possible edge case, such as empty session lists or exact formatting of the detailed output, but the combination of schema and description is sufficient for correct invocation.

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 100%, so the input schema already documents both parameters in detail. The description adds some voice-related guidance for the 'detailed' parameter ('Ask for details only when the user wants them'), but it doesn't add meaning beyond what the schema provides for 'include_unreachable.' Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Name the sessions you can drive.' This clearly distinguishes list_sessions from its siblings (session_status, read_transcript, send_message, get_reply, ask, rename_session), none of which are about enumerating sessions.

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 gives clear context: use the default short output for voice clients and only include details when the user actually wants them. It doesn't explicitly contrast with sibling tools like session_status, but the intended usage pattern is communicated well enough for most cases.

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