Skip to main content
Glama

codex_list_sessions

List recent Codex conversation sessions with IDs, titles, workspace directories, models, and timestamps. Filter sessions by keyword or cap results to find the thread you need.

Instructions

List recent Codex conversation sessions / threads (IDs, titles, workspace directories, models, and timestamps).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "codex_list_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of sessions to return (default: 15).
queryNoOptional keyword to filter sessions by title, ID, or workspace folder.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It implies a read-only listing and names the returned fields, but says nothing about ordering, pagination/truncation behavior, permissions, or whether sessions are filtered by the current user/workspace — the kind of behavioral detail an agent needs for a listing tool with no annotation coverage.

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 front-loaded sentence with the verb and resource first, and the parenthetical return-field list earns its place since there is no output schema. Nothing extraneous.

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?

With no output schema, the parenthetical correctly compensates by describing returned fields, and the two optional params are covered by the schema. Minor gaps remain around ordering, pagination, and scope of the listing, but the definition is broadly sufficient for a simple read tool.

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 coverage is 100%, so limit and query are fully documented in the schema, establishing the baseline of 3. The description adds no additional meaning about how filtering or limits interact (e.g., whether query matches case-insensitively or is scoped to recent sessions).

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?

Specific verb "List" paired with a concrete resource ("Codex conversation sessions / threads") plus an enumeration of the returned fields, so the agent knows exactly what it gets back. It does not distinguish itself from siblings like codex_read_session or codex_resume_session, which keeps it below a 5.

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?

"List recent ... sessions" implies a discovery/browsing use case, and the sibling name codex_read_session suggests this is the entry point before reading one. But there is no explicit statement of when to use this versus reading, forking, or resuming a session, and no exclusions.

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