Skip to main content
Glama

Fetch and delete job result (free)

codex_job_consume_result

Fetch a completed background Codex job's result and remove its stored record, preventing redundant polling and keeping state clean.

Instructions

Fetch a finished background Codex job's result and delete the stored record.

Same envelope as codex_job_result (matching the job's kind — branch on tool), then removes completed job state — but only once the stored result has been read intact and validated (a success or the job's own error envelope): a stored result this release cannot read (job_result_incompatible or a corruption internal_error) is NOT deleted, so it stays inspectable via codex_job_result. Deletion precedes the response, so a response lost in transit does not restore the record; a failed removal retains the record until its TTL (codex_job_status still shows it). Use only when you no longer need to poll or re-read the job. Non-done jobs are not deleted. Free — no model call.

detail works as in codex_job_result (#56).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailNoResponse verbosity: 'summary' (default) omits the raw model text; 'full' includes it.summary
job_idYesThe job_id from an *_async call or a sync call's meta.job_id; recover lost ids with codex_job_list.
workspace_rootNoAbsolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYestrue = success result, false = error result
Behavior1/5

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

The description richly discloses deletion semantics (validate-then-delete, delete-before-response, TTL retention), but annotations set destructiveHint=false while the tool explicitly deletes the stored record. This is an annotation contradiction, so per rubric the score is 1.

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?

Front-loaded with a clear one-sentence summary, followed by dense but necessary edge-case details. Slightly verbose with references like #56, but each clause earns its place for a complex destructive-plus-read operation.

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

Completeness5/5

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

Covers deletion timing, validation, corruption handling, failed-removal retention, TTL, non-done jobs, cost (free), and relation to sibling tools. Output schema exists, so return values need no explanation.

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

Parameters3/5

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

Schema description coverage is 100%; job_id and workspace_root are fully documented in the schema. The description only cross-references codex_job_result for detail, adding no meaning beyond the schema. Baseline 3 applies.

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?

Specific verb+resource: 'Fetch a finished background Codex job's result and delete the stored record.' This clearly distinguishes it from sibling codex_job_result (fetch-only) and codex_job_cancel.

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

Usage Guidelines5/5

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

Explicitly states 'Use only when you no longer need to poll or re-read the job,' mentions codex_job_result for inspectable retained results, and notes non-done jobs are not deleted.

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/briandconnelly/codex-in-claude'

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