Skip to main content
Glama

openai_get_task

Retrieve an async image task result by task ID or custom trace ID. Check status and get final output after processing completes.

Instructions

Retrieve a single async image task by its task ID or custom trace ID.

Image generation and editing requests submitted with a callback_url are
processed asynchronously and produce a persistent task record. Use this
tool to check whether the task has finished and to retrieve the final
result.

Note: tasks are only created when the original request included a
callback_url. Synchronous (non-callback) calls are not stored.

Use this when:
- You previously called openai_generate_image or openai_edit_image with a
  callback_url and want to retrieve the result
- You want to check the status of an async image task

Returns:
    JSON object with task details (id, trace_id, type, request, response,
    created_at, finished_at, duration) or an empty object if not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoTask ID returned by the original image request (e.g. from openai_generate_image or openai_edit_image when callback_url was set). At least one of 'id' or 'trace_id' must be provided.
trace_idNoCustom trace ID supplied via the 'trace_id' field on the original image request. When both 'id' and 'trace_id' are given, 'trace_id' takes precedence.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains that tasks are only created when a callback_url was provided, that synchronous calls are not stored, and it lists the returned fields. This provides sufficient behavioral context for a read-only retrieval tool.

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?

The description is well-structured with clear sections, including a note about task creation and usage guidance. It is concise and front-loaded with the main purpose. Minor redundancy (e.g., mentioning async twice) but overall efficient.

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 that an output schema is implied (the description lists returned fields), the description covers the tool's purpose, usage, and parameter semantics. It is complete for a retrieval tool, including the prerequisite about callback_url and the distinction from synchronous calls.

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 description coverage is 100%, with descriptions for both 'id' and 'trace_id'. The description adds value beyond the schema by explaining the relationship: at least one must be provided, and trace_id takes precedence when both are given. It also clarifies that 'id' comes from the original request and 'trace_id' is a custom ID.

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 that the tool retrieves a single async image task by task ID or custom trace ID. It uses specific verbs ('retrieve') and resource ('async image task'), and distinguishes itself from sibling tools like openai_list_tasks (which lists tasks) and openai_generate_image/openai_edit_image (which create tasks).

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 explicitly states when to use the tool: after calling openai_generate_image or openai_edit_image with a callback_url, to check status and retrieve result. It explains the prerequisite (callback_url must have been set) and the use case of checking async task status. It does not explicitly state when not to use it, but the context is clear.

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/AceDataCloud/OpenAIMCP'

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