Skip to main content
Glama

codex_read_session

Read messages, turn history, and tool actions from a specific Codex session to inspect conversation context, with controls for how many recent turns and whether tool calls are included.

Instructions

Read messages, turn history, and tool actions from a specific Codex session.

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>"
    },
    "name": "codex_read_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_turnsNoNumber of recent conversation turns to retrieve (default: 10).
session_idYesThe Codex session ID (UUID) to inspect.
include_tool_callsNoWhether to include tool calls in the output (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. 'Read' implies a non-mutating inspection, but it says nothing about side effects, permission/auth requirements, behavior when the session ID is unknown, pagination or truncation semantics, or the shape of the returned turn history.

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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity edges toward under-specification rather than tightness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All three parameters are schema-documented and no output schema exists, so the description only needs to frame the return and usage. It frames the return minimally ('messages, turn history, and tool actions') but leaves out how to pick a session ID and how the results are structured or bounded.

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 session_id, max_turns, and include_tool_calls are fully documented in the schema. The description's mention of 'turn history' and 'tool actions' loosely echoes max_turns and include_tool_calls but adds no syntax, defaults, or boundary behavior beyond the schema.

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 ('Read') and specific resources ('messages, turn history, and tool actions') scoped to 'a specific Codex session'. It is immediately clear what the tool retrieves, though it never contrasts itself with siblings like codex_fork_session or codex_resume_session, which also take a session.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g., that the session_id comes from codex_list_sessions), and no exclusion conditions against resume/fork/status siblings. Usage is only implied by the phrase 'from a specific Codex session'.

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