Skip to main content
Glama

Ask Codex (new session)

codex_ask

Submit a prompt to OpenAI Codex for coding tasks or reasoning. Returns the agent's final message as text.

Instructions

Ask OpenAI Codex (codex exec) a question or task in a NEW session.

Uses your existing Codex login (ChatGPT or API key — see codex login status). Returns the agent's final message as text, read from codex's --output-last-message file (no stdout scraping). Codex is a capable coding agent, so this suits heavier reasoning and real code work, not just cheap tool-calling. Point workspace at a real project dir for context-aware answers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model override (`-m`); omit to use codex's configured default.
watchNoIf true, open a live "watch" view in your browser that streams codex's steps (reasoning, the commands it runs, file changes) from its `--json` event stream. codex still runs headless; the same final text is returned. Best-effort — if the browser can't open, the run completes normally. Default false.
promptYesQuestion or instruction for Codex.
sandboxNoFilesystem policy — "read-only" (default: reads and answers but writes nothing), "workspace-write" (may edit files under the workspace), or "danger-full-access" (no sandbox — avoid). `codex exec` has no interactive approval gate, so this is the real safety boundary; opt into write access deliberately.read-only
timeout_sNoMax seconds to wait for codex to complete. Default 180.
workspaceNoWorking root for the session (`-C`). Defaults to the server cwd.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explains how output is obtained (from --output-last-message file, no stdout scraping) and mentions the sandbox as a safety boundary. Annotations already indicate non-readonly and open world, but the description adds useful behavioral context without contradiction.

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-structured with paragraphs, each sentence adding distinct information. It is concise, front-loaded with the main purpose, and avoids unnecessary fluff.

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 (6 parameters, 1 required) and the presence of an output schema, the description covers return type, safety boundaries, and usage context. It lacks mention of potential error handling or streaming but is sufficiently complete for effective use.

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?

Schema coverage is 100%, but the description adds meaningful elaboration beyond definitions, such as explaining 'new session' for prompt, workspace as working root, sandbox policy with examples, and watch functionality. This adds value beyond the schema.

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 verb 'ask' and the resource 'Codex' in a new session, distinguishing it from siblings like codex_continue. It specifies the tool's purpose for heavier reasoning and real code work, differentiating from cheap tool-calling.

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 provides usage context, such as requiring an existing Codex login and pointing workspace at a real project directory. It implies when to use (heavier reasoning) but does not explicitly state when not to use or list alternatives among siblings.

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/SinanTufekci/agent-intern'

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