Skip to main content
Glama
nayagamez
by nayagamez

codex

Execute coding tasks via a Codex CLI session and receive a Thread ID to continue the conversation.

Instructions

Run a Codex CLI session. Executes codex exec as a subprocess and returns the result.

Use this tool to start a new coding task with Codex. The response includes a Thread ID that can be used with the codex-reply tool to continue the conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the Codex session
modelNoModel name override. Do NOT set this unless the user explicitly requests a specific model or asks for the "latest" model — Codex CLI uses its own configured default. Known models: gpt-5.6-sol (latest, supports effort max)
configNoConfig overrides as key-value pairs (passed as -c key=value)
effortNoReasoning effort level. Auto-select based on task complexity: medium for simple tasks (quick questions, small edits), high for moderate tasks (bug fixes, features), xhigh for complex tasks (architecture, multi-file refactoring), max for the hardest tasks (deep analysis, large-scale design). Do NOT set if the user explicitly requests a specific level.
promptYesThe prompt to send to Codex
profileNoConfiguration profile from config.toml
sandboxNoSandbox mode for file access
timeoutNoTimeout in milliseconds (default: 600000 = 10 min). Increase for long-running tasks.
Behavior3/5

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

With no annotations, the description carries the transparency burden. It discloses that it executes a subprocess, returns a result, and provides a Thread ID, but it does not warn about potential side effects (e.g., file modifications depending on sandbox mode) or mention authorization requirements. The sandbox parameter is defined in the schema, but the description adds no behavioral context beyond basic execution.

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?

The description is two sentences, front-loaded with the primary action and followed by a brief usage note. Every sentence adds value—mentioning the subprocess execution, result return, Thread ID, and continuation with codex-reply. There is no redundancy or filler.

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?

The tool is complex with 8 documented parameters and no output schema. The description gives enough to start a task and mention the Thread ID, but it does not describe the overall return structure, error behavior, or caveats like long-running operations (despite a timeout parameter). It is adequate but leaves gaps for an agent to fully predict behavior.

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%, so the baseline is 3. The description itself does not elaborate on any parameters, but the schema thoroughly documents each one, including enums for effort and sandbox. Therefore, the description adds no additional parameter meaning beyond what the schema already provides.

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?

The description clearly states the tool runs a Codex CLI session via `codex exec` and returns the result, which is specific and distinguishable from the sibling tool codex-reply. The mention of starting a new coding task and providing a Thread ID for continuation reinforces its distinct role.

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

Usage Guidelines4/5

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

The description explicitly says to use this tool for starting a new coding task and implies codex-reply is for continuing, but it does not explicitly state 'do not use when continuing' or list exclusions. This is clear enough for an agent to decide, though a more explicit alternative comparison would make it stronger.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nayagamez/codex-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server