Ask Codex
codex_queryAsk OpenAI Codex questions or assign coding tasks to get a second opinion, explore unfamiliar code, or delegate implementation.
Instructions
Ask OpenAI Codex a question or give it a task. Use for getting a second opinion, exploring unfamiliar code, or tasks that benefit from a different model's perspective.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "codex_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Override the Codex model. OMIT this unless explicitly told otherwise: when omitted, the Codex CLI uses the default from ~/.codex/config.toml, which is kept current. This enum may lag behind newly released models. | |
| prompt | Yes | The question or task for Codex | |
| threadId | No | Continue a previous Codex conversation: pass the threadId returned by an earlier call. Omit to start a fresh thread. | |
| workingDirectory | No | Working directory (defaults to server cwd) |