Skip to main content
Glama
MauricioPerera

subway-mcp-server

Delegate task to Codex CLI

delegate_to_codex
Destructive

Execute a coding task using Codex CLI non-interactively and receive the final output. Use when you need to assign a programming task to a sub-agent.

Instructions

Runs OpenAI's Codex CLI non-interactively (codex exec) to execute a coding task and returns its final message.

Args:

  • prompt (string, required): task instructions for Codex

  • cwd (string, optional): absolute working directory for the task

  • model (string, optional): model override (e.g. "gpt-5.6-luna")

  • timeout_seconds (number, optional, default 600): kill the process after this many seconds

  • auto_approve (boolean, optional, default false): bypass Codex's shell/edit approval prompts. Without this, tasks that need to run a command or edit a file will fail immediately since there is no terminal to approve from.

Returns structured JSON: { success, final_message, exit_code, timed_out, stderr? }.

Error Handling:

  • success=false with a non-zero exit_code and stderr populated means Codex reported an error (e.g. auth, invalid model, sandbox denial)

  • timed_out=true means the task exceeded timeout_seconds and was killed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoAbsolute path to the working directory the sub-agent should operate in. Defaults to this MCP server's own working directory if omitted.
modelNoModel override for this run (e.g. 'gpt-5.6-luna', 'claude-opus-4-8'). Omit to use the CLI's own configured default.
promptYesTask instructions for the sub-agent to execute, exactly as it should receive them.
auto_approveNoBypass the sub-agent's interactive tool-permission prompts (shell commands, file edits, etc). This call has no terminal attached, so without auto_approve most non-trivial tasks will fail immediately the first time the sub-agent needs to use a tool. Set true when you trust the task to run unattended.
timeout_secondsNoHow long to wait for the sub-agent to finish, in seconds (10-1800, default 600). The process is killed if it runs longer.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stderrNoCaptured stderr, included only when the run was not successful.
successYesTrue if the sub-agent process exited with code 0 and did not time out.
exit_codeYesProcess exit code, or null if the process could not be spawned.
timed_outYesTrue if the process was killed after exceeding timeout_seconds.
final_messageYesThe sub-agent's final response text.
Behavior4/5

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

Annotations indicate destructiveHint=true and openWorldHint=true, but the description adds critical details: non-interactive mode, auto_approve necessity (tasks fail without terminal), timeout killing, and structured return values. This significantly enriches understanding beyond annotations.

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?

The description is well-structured with clear sections (Args, Returns, Error Handling). Every sentence contributes practical information, though some default values are repeated between schema and description, making it slightly longer than necessary.

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?

Given the tool's complexity (5 parameters, output schema), the description covers input semantics, return structure, and error handling comprehensively. No critical gaps are evident, though concurrency or resource impacts are not addressed.

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?

With 100% schema coverage, the description still adds value by explaining defaults (cwd, model), behavioral implications (auto_approve), and range constraints (timeout). This context helps the agent craft appropriate parameter values.

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 clearly states it runs Codex CLI non-interactively to execute a coding task and returns results. While it doesn't explicitly differentiate from siblings (delegate_to_agy, delegate_to_claude), the title and specificity to Codex make the purpose unambiguous.

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 provides no guidance on when to use this tool vs. its siblings. It neither explains the distinguishing characteristics of Codex CLI nor suggests alternatives for other AI agents, leaving the agent to infer usage from the name alone.

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/MauricioPerera/subway-mcp-server'

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