Skip to main content
Glama
kiranmaya

AI CLI MCP Server

by kiranmaya

codex_run

Automate coding tasks by sending a prompt to OpenAI Codex CLI in a target directory, returning exit status, output, and logs.

Instructions

Executes a coding prompt non-interactively using the OpenAI Codex CLI.

Args: prompt: Detailed instruction or task description for the Codex agent. working_directory: Target project root directory where the task executes. model: Optional model override (e.g. o3-mini, o1, gpt-4o). timeout: Execution timeout in seconds (default: 300, max: 1800). yolo: When true, runs in YOLO mode (--dangerously-bypass-approvals-and-sandbox) for automated non-blocking execution.

Returns: JSON string containing success status, exit code, execution time, stdout, and stderr.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yoloNo
modelNo
promptYes
timeoutNo
working_directoryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It does transparently mention YOLO mode and the '--dangerously-bypass-approvals-and-sandbox' flag, which signals safety implications, and it discloses the non-interactive nature. However, it does not explicitly state that running the prompt can modify the working directory, execute arbitrary code, or require authentication.

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 well-organized with a purpose sentence followed by labeled Args and Returns sections. Every line carries useful information, and there is no redundant repetition of schema defaults.

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?

The description covers all parameters and the output shape, which is sufficient for most invocation decisions. It is slightly incomplete for an arbitrary-code execution tool because it does not mention prerequisites such as Codex CLI installation/authentication or potential filesystem side effects, but the YOLO flag disclosure partially mitigates this.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates for every parameter: prompt, working_directory, model with concrete examples, timeout with default and max, and yolo with behavior and flag mapping. It adds meaning that the bare schema titles lack.

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 opens with a specific verb and resource: 'Executes a coding prompt non-interactively using the OpenAI Codex CLI.' This clearly differentiates the tool from siblings like codex_review and cli_status, making its role as the execution-focused tool obvious.

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?

The description gives no explicit guidance on when to choose codex_run over codex_review, antigravity_run, or antigravity_review. There is no stated condition such as 'use for non-interactive execution' versus 'use review for critique', so an agent must infer the appropriate selection from the tool name and siblings.

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