websearch
Run a web search via the Codex web search tool in a read-only session returning a background job. Retrieve results with waitCommand, waitCommandPosix, or job_status using the jobId.
Instructions
Start a search using the native Codex web search tool in a read-only session. Returns a background job immediately. Run waitCommand or waitCommandPosix (Bash or Zsh), or call job_status with jobId for output.
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": {
"query": "<query>"
},
"name": "websearch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model slug or alias. When a speed tier is active, defaults to CODEX_DEFAULT_MODEL or sol. Otherwise uses the Codex CLI model if omitted. | |
| query | Yes | Search query string | |
| speed | No | Alias for serviceTier. | |
| numResults | No | Number of results to return (default: 10) | |
| searchDepth | No | Search depth: basic or full | |
| serviceTier | No | Speed tier: fast (priority), ultrafast, or default/standard to disable the override. Case-insensitive. Falls back to CODEX_DEFAULT_SERVICE_TIER. Check listModels for supported tiers. | |
| service_tier | No | Alias for serviceTier. | |
| reasoningEffort | No | Reasoning effort depth: none, minimal, low, medium, high, xhigh, max, ultra (also accepts snake_case reasoning_effort). | |
| reasoning_effort | No | Alias for reasoningEffort. | |
| workingDirectory | No | Working directory for Codex CLI. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| jobId | Yes | ||
| model | Yes | ||
| status | Yes | ||
| logFile | Yes | ||
| runnerPid | Yes | ||
| sessionId | Yes | ||
| stderrFile | Yes | ||
| stdoutFile | Yes | ||
| serviceTier | Yes | ||
| waitCommand | Yes | ||
| waitCommandPosix | Yes |