Skip to main content
Glama

Read a Codex thread transcript

codex_read_thread
Read-onlyIdempotent

Read any Codex thread's message history from local session files, no API call or quota needed, works even when rate-limited. Retrieve recent messages regardless of how the thread was created.

Instructions

Read the message history of any Codex thread — whether it was created interactively (GUI / VS Code / TUI) or programmatically. Reads the thread's rollout JSONL from ~/.codex/sessions directly, so it needs no API call, consumes no quota, and works even when the account is rate-limited. Returns the most recent messages by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax messages to return, counting back from the most recent.
max_charsNoTruncate each individual message to this many characters.
thread_idYesThe thread/session id (UUID) whose transcript to read.
include_reasoningNoInclude the agent's internal reasoning entries, not just user/agent messages.
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses that it reads directly from local JSONL files, needs no API call, consumes no quota, and works even when rate-limited. This adds significant behavioral context about its underlying mechanism and operational characteristics.

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 concise and front-loaded with the primary purpose in the first sentence. It includes only relevant details about the local file reading, quota-free operation, and default behavior, with no redundant or filler content.

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 description is fairly complete for a read-only tool with annotations and full schema coverage. It explains the key use case, mechanism, and default behavior. However, it lacks details about the return format (e.g., JSON structure) or error handling, which would be useful given there is no 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 input schema has 100% parameter coverage with detailed descriptions for limit, max_chars, thread_id, and include_reasoning. The description only adds that it returns the most recent messages by default, which is already implied by the schema's 'default: 50' and 'counting back from the most recent'. No additional parameter meaning is provided beyond the schema.

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 clearly states the tool's function: 'Read the message history of any Codex thread'. It identifies the specific resource (Codex thread), the action (read), and distinguishes from siblings by covering both interactive and programmatic threads. It also mentions reading from ~/.codex/sessions, which is a unique characteristic.

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 provides clear context on when to use the tool: it can read any thread, requires no API call, consumes no quota, and works under rate limits. However, it doesn't explicitly mention alternatives like codex_local_sessions for listing threads or codex_ask for asking questions, so it lacks explicit when-not-to-use guidance.

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/eyalk11/codex-mcp-bridge'

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