Skip to main content
Glama

Ask Codex

codex_ask

Request an independent read-only review of your code changes from OpenAI Codex. Get a thread ID to ask follow-up questions.

Instructions

Get an independent opinion from a different model (OpenAI Codex), e.g. a read-only review of changes you made. Returns a thread_id; keep it if you may want to ask follow-ups.

Codex runs as an agent in cwd and can read files and run read-only commands there itself, so name the files, diff range or question precisely instead of pasting large content. A run can take several minutes. Default sandbox is read-only; only use workspace-write when you explicitly want Codex to edit files. Returns JSON: { thread_id, answer, duration_sec, warnings[], activity?, answer_file?, error? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute path of the project directory Codex should work in.
fastNoFast mode (faster responses). Uses roughly 2.5x the ChatGPT subscription usage limits, so leave it off unless the user explicitly asked for fast mode.
modelNoCodex model id. Omit to use the configured default.
effortNoReasoning effort. Omit to use the configured default. Checked against the levels the model supports (an unsupported level returns an error listing the supported ones).
promptYesWhat to ask Codex. Be specific (files, commits, what to look for).
sandboxNoread-only (default): Codex cannot modify files. workspace-write: Codex may edit files in cwd.
timeout_secNoKill Codex after this many seconds (default 900, max 3600).
skip_git_checkNoAllow running in a directory that is not a git repository (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: Codex runs as an agent in cwd and can read files and execute read-only commands itself, runs can take several minutes, and the default sandbox blocks file modification. The stated default read-only sandbox is consistent with readOnlyHint=false (writes are possible under workspace-write) and openWorldHint=true (external model/agent), so there is no contradiction.

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?

Front-loaded with purpose, then behavior, then return shape; every sentence carries information and the timeout/warnings/error details are useful given there is no output schema. Minor redundancy in mentioning the thread_id twice, which is why it is not a 5.

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

Completeness5/5

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

With no output schema, the description correctly supplies the return shape ({ thread_id, answer, duration_sec, warnings[], activity?, answer_file?, error? }), plus latency expectations and sandbox defaults. Nothing an agent needs to call this correctly and interpret the result is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema carries parameter documentation and the baseline is 3. The description still adds real value: guidance on how to phrase 'prompt' (files, diff range, question) and the cwd-as-working-directory semantics, rather than repeating field-level descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (get an independent opinion from OpenAI Codex) and gives a concrete use case (read-only review of changes). It also differentiates from the sibling by explaining that the returned thread_id is what enables follow-ups, so an agent can route between codex_ask and codex_followup without opening either schema.

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

Usage Guidelines5/5

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

Explicitly covers when to use the default (read-only review) and when not to ('only use workspace-write when you explicitly want Codex to edit files'), plus the fast-mode cost caveat. It also tells the agent to name files/diff ranges precisely rather than pasting content, which is actionable invocation guidance.

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

Deploy Server

Other Tools