Skip to main content
Glama

gemini_list_sessions

List saved Gemini CLI sessions for the current project, showing index and message previews to find a session ID and resume previous conversations.

Instructions

List saved Gemini CLI sessions for the current project.

Returns a list of sessions with their index and first-message preview. Use this to find a session_id to resume a previous conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirNoAbsolute path to the project directory. Defaults to current directory.
timeout_secondsNoSeconds to wait.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It accurately conveys a non-mutating operation ('List', 'Returns') and adds context about project scoping and response contents. It does not mention edge cases (e.g., empty list) or authentication, but these are less critical for a simple listing operation.

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 three sentences with no filler. The first sentence states the primary purpose, the second describes the return value, and the third provides a usage scenario. Every sentence earns its place, and the text is front-loaded with the main action.

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 simple list tool with full schema coverage and an output schema, the description is largely complete. It covers what the tool does, what the response contains, and when to use it. It lacks mention of error handling or prerequisites, but these are not essential for this low-complexity tool and are not expected to be documented given the output schema.

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?

The schema provides 100% coverage for the two optional parameters (project_dir and timeout_seconds) with their own descriptions. The tool description only indirectly relates to project_dir via 'current project' and does not elaborate on timeout_seconds behavior. Since the schema already handles parameter explanations, a baseline score of 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 uses a specific verb 'List' with resource 'saved Gemini CLI sessions' and scope 'current project'. It clearly states the return output (index and first-message preview), and the inclusion of 'Gemini' in the name differentiates it from the sibling tool opencode_list_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 explicitly states 'Use this to find a session_id to resume a previous conversation,' which is a clear, actionable use case. It implies this is the tool for Gemini CLI sessions rather than opencode sessions, but it does not name any alternative tools or explicitly state when not to use it.

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/h19overflow/polycode'

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