Skip to main content
Glama

read_session

Read-only

Reads a session’s recent conversation, status, errors, and questions to show whether it crashed, awaits input, or finished, and flags usage-limit stops.

Instructions

会話の最近のやりとりを読む(依頼の文・AI の返事・状態・エラー・利用者への質問)。落ちたのか、判断待ちなのか、終わったのかを見分けるのに使う。長い文は末尾を残して切る。Codex はターンごと、Claude Code は最近の出力(claude logs)。利用制限で止まったらしいときは usageLimit に当たった行を返す(Codex はターンの error を見る)。

Input Schema

NameRequiredDescriptionDefault
turnsNoCodex だけ: 読むターンの数
maxCharsNo
threadIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.2

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses truncation behavior (long text is cut keeping the tail), platform-specific semantics (Codex is per turn, Claude Code returns recent claude logs), and a special mode that returns the line hitting usageLimit. These are operational traits an agent cannot infer from the annotations or schema.

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?

Four dense sentences, front-loaded with the core action and use case, followed by operational caveats. Every sentence carries information, though the platform-specific notes are somewhat compressed.

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 read tool with no output schema, the description explains what content is returned, how it is truncated, and platform differences. The only notable omission is any explanation of the required threadId parameter, which is likely obvious but left unstated.

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?

With only 33% schema description coverage, the description partially compensates by tying `turns` to Codex only and implying truncation via `maxChars`. However, `threadId` is never explained and `maxChars` semantics (default 6000, tail-keeping) remain implicit, so the gap is only partially filled.

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: reading the recent exchanges of a conversation, including request text, AI replies, state, errors, and questions. An agent can tell this apart from siblings like list_sessions or send_message without opening any schema.

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?

Gives a clear context for use: to distinguish whether a session crashed, is waiting for a decision, or has finished. It does not name an alternative tool for the cases where this one is not appropriate, so it falls short of a full when/when-not routing rule.

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