Skip to main content
Glama

list_sessions

List sessions from Claude Code, Codex, Copilot, Cursor, Gemini, AGY, Grok, and OpenCode, prioritizing live agents. Filter by working directory, agent, branch, or query.

Instructions

List Claude Code, Codex, Copilot, Cursor, Gemini, AGY, Grok, and OpenCode sessions. Live agents first.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory to match (canonical or prefix)
agentNoagy, claude, codex, copilot, cursor, gemini, grok, or opencode
limitNo
queryNo
branchNoGit branch name
live_onlyNo
include_archivedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.2
    • changedInput schema / properties / agent / description
      Previous value: -"claude, codex, copilot, cursor, gemini, grok, or opencode"New value: +"agy, claude, codex, copilot, cursor, gemini, grok, or opencode"
  2. First observedv0.11.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but only discloses sort ordering ("Live agents first"). It says nothing about default filtering of archived sessions, result format, pagination, or why a session might be omitted, all of which matter for a 7-parameter listing tool.

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?

Two short sentences, front-loaded with the resource and scope, with zero filler. It is efficient, though the terseness trades away useful detail rather than being genuinely information-dense.

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

Completeness2/5

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

For a 7-parameter tool with no annotations and no output schema, the description is thin: it omits default behavior for include_archived/live_only, how filters combine, and what a returned session record contains. An agent could call it, but only by guessing at defaults.

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

Parameters2/5

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

Schema coverage is only 43%, so the description must compensate, yet it adds meaning only for the `agent` parameter by restating the supported agent names. The remaining parameters (cwd, limit, query, branch, live_only, include_archived) receive no explanation or interaction semantics beyond what the schema already says.

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?

States a specific verb and resource ("List ... sessions") and enumerates the eight agent families it covers, so the scope is unambiguous. It does not differentiate itself from siblings like get_session or session_digest, so the agent must infer the singular-vs-list distinction from the names alone.

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

Usage Guidelines2/5

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

The description gives no when-to-use guidance, no prerequisites, and names no alternative. "Live agents first" describes result ordering, not the conditions under which this tool should be chosen over get_session or session_digest.

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