Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

codex_get_session

Inspect metadata and recent user/assistant turns for a Codex session ID to review past context and activity.

Instructions

Inspect metadata and recent user/assistant conversation turns for a specific Codex session_id.

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_get_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_turnsNoMaximum recent turns to return (default 10).
session_idYesCodex session UUID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/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 does convey that this is a read-only inspection and that output is bounded to "recent" turns, but it says nothing about behavior on an unknown or expired session_id, whether completed sessions are readable, ordering of turns, or error responses.

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?

A single sentence that front-loads the resource and closes with the scoping key. Nothing redundant or padded.

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 simple two-parameter read tool with no output schema, the description adequately tells the agent what it will get back (metadata plus recent turns). Only edge-case behavior for invalid sessions and turn ordering is missing.

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%, with both session_id (UUID) and max_turns (default 10, range 1-100) documented in the schema. The phrase "recent ... turns" is consistent with max_turns but adds no new detail such as ordering or truncation behavior, so baseline 3 applies.

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 uses a specific verb ("Inspect") and names the resources precisely: session metadata plus recent user/assistant conversation turns, scoped to a specific session_id. It does not explicitly contrast itself with siblings such as codex_list_sessions or codex_result, so the agent must infer the boundary.

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?

Usage is only implied: call this when you have a session_id and want to see what was said. There is no explicit statement of when to prefer it over codex_result, codex_poll, or codex_list_sessions, and no prerequisites or exclusions are given.

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