Skip to main content
Glama

list_gemini_sessions

Lists Gemini CLI chat sessions from local storage with session ID, title, project directory, model, and updated time. Filter by query or working directory to find relevant transcripts.

Instructions

List Gemini CLI sessions from ~/.gemini/tmp/*/chats with session_id, title, resolved project working directory, model, and updated timestamp.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum sessions to return (default 25).
queryNoOptional substring filter on title, cwd, model, or ID.
cwd_filterNoOptional substring filter on working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/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 does disclose the storage location and the shape of returned records, which is genuinely useful. However, it omits behavior an agent would want: read-only nature is only implied by "List", and sort order, behavior on missing/empty directories, and how the project working directory is "resolved" are unstated.

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?

A single front-loaded sentence that states the action, the source, and the returned fields with no filler. Every clause earns its place.

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?

There is no output schema, so enumerating the returned fields (session_id, title, cwd, model, updated timestamp) is valuable and compensates well. The tool is simple with three optional filters, and the description is adequate, though it could have noted ordering or empty-result behavior.

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 all three optional parameters (limit, query, cwd_filter) are already documented in the schema. The description adds no param-level meaning beyond noting the returned fields include "resolved project working directory" and "model", which loosely corresponds to the filterable dimensions. Baseline 3 applies.

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?

The description names a specific verb and resource ("List Gemini CLI sessions") and even identifies the on-disk source (~/.gemini/tmp/*/chats) plus the fields returned. This is far more specific than a title restatement, though it never explicitly distinguishes itself from search_gemini_sessions, leaving differentiation implicit in the list-vs-search wording.

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 only implied: an agent can infer this enumerates all sessions from local storage, with filtering delegated to the optional query/cwd_filter params. There is no explicit statement of when to prefer this over search_gemini_sessions or read_gemini_session, and no preconditions (e.g., whether the directory must exist) are given.

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