Skip to main content
Glama

get_codex_session

Read-onlyIdempotent

Retrieve messages from a specified Codex session to review conversation history, inspect prior CLI activity, and support debugging.

Instructions

Return messages from one 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": "get_codex_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered structurally. The description adds nothing on top: no message ordering, no truncation behavior when the default limit of 200 is hit, and no indication of what happens for an unknown session_id.

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 short sentence with the resource scope front-loaded and no filler. Its brevity is efficient, though it shades into under-specification rather than tight editing.

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

Completeness2/5

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

For a two-parameter retrieval tool with no output schema and zero schema description coverage, the description should at least explain the session_id source and the limit/pagination behavior. Neither is present, leaving the agent to guess about truncation and identifier provenance.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must carry parameter meaning, and it does not: session_id is only obliquely hinted by "one Codex session", and the limit parameter (default 200, max 1000) — which determines whether results are silently truncated — is never mentioned.

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?

"Return messages from one Codex session" gives a specific verb (Return) and a specific resource (messages of one session), which is enough to distinguish it in kind from session-listing tools like latest_codex_sessions. It stops short of any explicit sibling differentiation and leaves it unclear whether only messages or also session metadata are returned.

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?

The phrase "one Codex session" implies the tool is for fetching a known session's contents, which is a weak but usable usage hint. There is no statement of when to prefer this over search_codex_history or latest_codex_sessions, and no note that a session_id must first be obtained from those tools.

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