Skip to main content
Glama
tksfjt1024

codex-cli-mcp-slim

by tksfjt1024

codex

Run a non-interactive agentic coding session from a prompt and return the final message; optionally reads and edits files in the working directory.

Instructions

Run a single non-interactive Codex session (codex exec) with the given prompt and return its final message. codex is an agentic coding assistant that reads and, depending on the sandbox, edits files inside the working directory. Forward-compatible: unknown CLI flags can be passed via extra_args. The codex binary path is configurable via $CODEX_CMD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cdNoPass -C <DIR>: the working directory codex runs in. Defaults to this server's own working directory.
envNoExtra environment variables for the codex subprocess.
modelNoPass -m <MODEL>: the model slug for this call, overriding config.toml.
configNoConfiguration overrides as key=value strings, one per element. Each entry maps to a separate codex -c flag (for example "model_reasoning_effort=high"). Values are parsed as TOML by codex, so quote strings that are not bare words.
promptYesPrompt sent verbatim to codex on stdin. codex runs its full agentic loop and this server returns the final agent message.
add_dirNoExtra writable directories. Each entry maps to a separate codex --add-dir flag (repeatable, not comma-joined).
profileNoPass -p <PROFILE>: the config.toml profile to load.
sandboxNoPass --sandbox <MODE>: read-only, workspace-write or danger-full-access. Overrides sandbox_mode from config.toml; network access still follows the [sandbox_workspace_write] section there.
ephemeralNoPass --ephemeral: do not persist the session's rollout file to disk.
extra_argsNoRaw CLI flags appended verbatim (one token per element). Use to reach new or uncommon codex exec flags without updating this server. Do not pass --json or a prompt: the server adds both.
timeout_secondsNoHard wall-clock timeout for the codex subprocess in seconds (default 1800).
skip_git_repo_checkNoPass --skip-git-repo-check: allow running in a directory that is not inside a git repository. Without it codex refuses such a working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: non-interactive single session, agentic file reads/edits, sandbox-dependent side effects, and return of the final message. It omits other important traits such as authentication requirements, cost/latency expectations, and the default 1800s timeout (which is only in the schema).

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?

Four sentences, tightly written and front-loaded with the core action before the explanatory and extensibility details. Nothing is padded, though the codex-agent explanation sentence is arguably the weakest link.

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?

For a 12-parameter, no-annotation, no-output-schema tool, the description covers purpose and some behavior but leaves gaps: no differentiation from `codex-reply`, no auth/prerequisite note, and no sense of cost or duration. Adequate but incomplete for the tool's complexity.

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 schema already documents every parameter, making 3 the baseline. The description adds only marginal value beyond the schema (the $CODEX_CMD and extra_args notes), so there is no reason to score higher.

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?

States a specific verb+resource: running a single non-interactive `codex exec` session and returning its final message. It also defines what codex is (an agentic coding assistant that reads/edits files), which helps an agent understand the tool. However, it never contrasts itself with the sibling `codex-reply`, so an agent must guess which one to pick.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no mention of the `codex-reply` sibling that presumably continues a session. The closest thing to guidance is the `extra_args` forward-compatibility note, which is a usage hint for extensibility rather than routing 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