Skip to main content
Glama

Analyze with Codex

codex_analyze
Read-only

Start or resume a persistent, read-only Codex analysis thread for a project. Reuse the session key to continue prior analysis without losing workspace context.

Instructions

Start or resume a persistent Codex thread in a read-only filesystem sandbox.

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_key": "<session_key>",
      "prompt": "<prompt>"
    },
    "name": "codex_analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoRequired on first use; later calls use the saved workspace.
promptYes
session_keyYesStable logical session name. Reuse it to continue the same Codex thread.
retry_failedNoExplicitly start a replacement only when an earlier attempt never obtained a thread ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true and idempotentHint=false; the description's 'read-only filesystem sandbox' is consistent and usefully clarifies what the sandbox restricts. What is missing is behavior beyond that: whether threads persist across calls/servers, what happens if a session_key is unknown or the run fails, and any auth or rate-limit constraints on an open-world analysis tool.

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, which is well within budget. It is efficient rather than padded, though the first-use-vs-resume distinction it gestures at is only half surfaced.

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?

This is a stateful, session-oriented tool with a first-use cwd requirement, a resume path and a retry_failed recovery switch, and none of that lifecycle is described; there is no output schema to cover the gaps. The definition is enough to identify the tool but not enough to call it correctly in edge cases.

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 75%, with session_key, cwd and retry_failed already documented in the schema, so the baseline is a 3. The description adds no parameter-level meaning of its own — the 'resume' concept is already spelled out in session_key's schema text.

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 pair ('Start or resume') and resource ('persistent Codex thread') and adds a scope constraint ('read-only filesystem sandbox'), so the core action is unambiguous. It does not, however, distinguish this from codex_execute, which by name alone sounds like it performs an overlapping analysis/execution task.

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?

'Start or resume' implies the two modes of use, and 'persistent' hints that repeated calls should reuse the same thread, but the agent is never told when to prefer this over codex_execute or codex_sessions, nor when not to use it. The session-continuation condition is left implicit rather than stated.

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