Skip to main content
Glama

Gemini Sessions

gemini-sessions
Read-onlyIdempotent

List active Gemini sessions or export a session's full conversation history as JSON or Markdown, optionally limiting exports to the last N turns.

Instructions

List or export Gemini sessions. If sessionId is omitted, returns the list of active sessions (id, lastAccessed, turnCount, expiresAt). If sessionId is provided, returns the full conversation history (turns + pre-rendered content) in the requested format.

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": "gemini-sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
lastNNoOnly used when sessionId is provided. Export only the last N individual messages (turns). A single user+assistant exchange is 2 turns.
formatNoExport format (only used when sessionId is provided; default: json).
sessionIdNoOptional. When omitted, returns the list of active sessions. When provided, returns the full conversation history of that session.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower. The description adds useful behavioral detail about what each mode returns — active session metadata fields and full conversation history in a requested format — which goes beyond the annotations.

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 tightly written sentences, front-loaded with the core action and then the mode split. Nothing is wasted, though a portion of the content echoes the schema descriptions.

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?

With an output schema present and rich annotations, the description needs only to frame the two modes and their outputs, which it does. It is complete enough for an agent to call correctly, with only minor room to note sibling routing.

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 schema already documents sessionId, lastN, and format thoroughly. The description restates the sessionId branching but adds no meaning about the turn-counting semantics of lastN or the markdown format beyond what the schema provides.

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 opens with a specific verb and resource ('List or export Gemini sessions') and spells out the two operating modes. It is immediately distinguishable from siblings like ask-gemini or gemini-poll, though it never explicitly names or contrasts those alternatives.

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?

It explains the conditional behavior tied to sessionId (omitted = list, provided = export), which implies when each mode applies. However, there is no guidance on when to reach for this tool versus sibling session/status tools, and the branching is already fully documented in the schema.

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