Skip to main content
Glama

get_session

Retrieve the full conversation flow for a specific session by session ID and source, with optional message limits and tool call details.

Instructions

Retrieve the conversation for a specific session.

session_id: from list_sessions output (a unique prefix works) source: claude | codex | gemini | opencode | cursor max_messages: limit messages returned (default 30) to control token usage. include_tools: interleave tool calls/results (commands, edits, errors).

Prefer search_history for finding context; use this only when you need the full conversation flow.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "source": "<source>"
    },
    "name": "get_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYes
session_idYes
max_messagesNo
include_toolsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
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 discloses the two behavioral knobs that matter for cost and volume: max_messages caps output to control token usage, and include_tools interleaves commands, edits, and errors into the transcript. It does not say what happens when a session exceeds max_messages (truncation vs. error), which is the main remaining behavioral gap.

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?

Front-loads the one-line purpose, then a compact parameter block, then the routing rule last. Nearly every line earns its place; the only mild redundancy is restating defaults that the schema already declares, though here it is doing double duty as parameter documentation.

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 a simple read, an output schema exists so return values need no explanation, and the description covers all params plus the sibling routing decision. The one missing piece relative to complexity is truncation behavior beyond max_messages, which an agent would want to know before requesting a long session.

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

Parameters5/5

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

Schema coverage is 0%, yet every one of the four parameters is explained beyond its name: session_id accepts a unique prefix from list_sessions, source is given an explicit value set that the schema lacks entirely (no enum), max_messages states its default 30 and token-control purpose, and include_tools spells out that tool calls/results are interleaved.

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?

States a specific verb and resource ('Retrieve the conversation for a specific session') and immediately separates itself from search_history by scope of need (full conversation flow vs. finding context). An agent can pick between the two without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: 'Prefer search_history for finding context; use this only when you need the full conversation flow.' This names both the alternative and the condition that selects this tool, leaving nothing to inference.

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