Skip to main content
Glama

run_codex_prompt

Execute a Codex CLI prompt locally through a secure MCP interface, returning structured automation output. Supports configurable working directory, sandboxing, and approval policies for controlled execution.

Instructions

Run a prompt via local Codex CLI (codex exec) and return structured automation output.

2Bot always uses non-interactive mode and sends the prompt over stdin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
modelNo
promptYes
profileNo
sandboxNoread-only
add_dirsNo
ephemeralNo
allow_editsNo
timeout_secNo
approval_policyNo
include_event_logNo
skip_git_repo_checkNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses two key behaviors: non-interactive mode and sending the prompt over stdin. However, it does not mention side effects, required permissions, error behavior, or the significance of sandbox/approval parameters. This is partial disclosure but not comprehensive for a potentially mutating tool.

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 long, with each sentence adding distinct value: first purpose, then a critical behavioral detail. It is front-loaded and contains no fluff or repetition of structured data.

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

Completeness2/5

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

Despite having an output schema, the tool is complex (12 parameters, many affecting safety and policy). The description omits any explanation of parameter semantics, usage context, or behavioral limitations. For an agent to invoke this tool correctly, it would need additional knowledge about sandbox modes, approval policies, and other settings that the description does not provide.

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

Parameters1/5

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

The input schema has 12 parameters with 0% description coverage, and the tool description does not explain any of them. While 'prompt' is implicitly referenced via 'sends the prompt over stdin', no parameter semantics are clarified. The description fails to compensate for the schema's lack of descriptions, leaving the agent to guess the meaning of cwd, model, sandbox, approval_policy, etc.

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's function: 'Run a prompt via local Codex CLI (`codex exec`) and return structured automation output.' It specifies the verb, resource, and expected output. Since there are no sibling tools, differentiation is not needed, and the purpose is unambiguous.

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

Usage Guidelines3/5

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

The description does not provide explicit when-to-use guidance or mention alternatives (no siblings exist). The line '2Bot always uses non-interactive mode and sends the prompt over stdin' gives context about invocation but not about when to select this tool over others. Usage is implied by the purpose, but there is no clear context or exclusions.

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/charlesmichaelbaird/2bot-mcp'

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