Skip to main content
Glama

获取图片生成任务详情

get_generation_task

Query image generation task status and retrieve results with structured output, image preview, and original URL. Use the returned taskId to fetch results after a generation timeout.

Instructions

查询图片生成任务状态与结果。任务成功时返回统一结构化 envelope、有界 MCP 图片预览和原图 URL。generate_image 等待超时后可用返回的 taskId 在这里取回结果。

Input Schema

NameRequiredDescriptionDefault
taskIdYes

Output Schema

NameRequiredDescriptionDefault
errorNo
imagesYes
statusYes
taskIdNo
messageNo
warningsNo
retryableNo
generationNo
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "details": {},
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "generation": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "finishReason": {
      +          "type": "string"
      +        },
      +        "modelVersion": {
      +          "type": "string"
      +        },
      +        "responseId": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "images": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "byteLength": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "filePath": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "height": {
      +            "exclusiveMinimum": 0,
      +            "type": "integer"
      +          },
      +          "index": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "mimeType": {
      +            "type": "string"
      +          },
      +          "preview": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "byteLength": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "height": {
      +                "exclusiveMinimum": 0,
      +                "type": "integer"
      +              },
      +              "included": {
      +                "type": "boolean"
      +              },
      +              "mimeType": {
      +                "type": "string"
      +              },
      +              "width": {
      +                "exclusiveMinimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "included"
      +            ],
      +            "type": "object"
      +          },
      +          "sha256": {
      +            "pattern": "^[a-f0-9]{64}$",
      +            "type": "string"
      +          },
      +          "url": {
      +            "format": "uri",
      +            "type": "string"
      +          },
      +          "width": {
      +            "exclusiveMinimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "mimeType",
      +          "preview"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "retryable": {
      +      "type": "boolean"
      +    },
      +    "schemaVersion": {
      +      "const": 1,
      +      "type": "number"
      +    },
      +    "status": {
      +      "enum": [
      +        "succeeded",
      +        "pending",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "taskId": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "schemaVersion",
      +    "status",
      +    "images"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden — and it does disclose the return contract: a unified structured envelope, a size-bounded MCP image preview, and the original image URL. That 'bounded preview' detail is genuinely non-obvious behavior. It does not address failure paths (failed task, unknown taskId) or auth/rate limits, so it falls short of a 5.

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?

Three short sentences, front-loaded with purpose, then return shape, then the recovery workflow. Nothing is repeated from the schema or annotations and no sentence is filler.

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?

An output schema exists, so return values need less prose, yet the description still sketches the envelope and preview/URL split. Combined with the generate_image timeout flow, an agent has enough to call it correctly; only the behavior for a failed or expired task is unaddressed.

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 0%, so the single required taskId is only explained by the description — and it does explain provenance: it is the taskId returned by generate_image after a wait timeout. No format or length constraints are restated, but the origin of the value is the piece the schema cannot convey.

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?

Names a specific verb and resource in the first clause (query image generation task status and result), and the singular 'task' framing plus the explicit hand-off from generate_image separates it from list_generation_tasks. An agent can tell what this retrieves without opening the schema.

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?

States a concrete trigger and alternative: after generate_image times out, call this with the returned taskId to get the result. That is a clear when-to-use. It stops short of an exclusion (e.g. do not use this to enumerate tasks — use list_generation_tasks instead), so it is not a full when/when-not statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.