Skip to main content
Glama

等待图片生成任务完成

wait_for_generation_task

Poll an asynchronous image generation task until completion, then return the public image URL or failure reason, removing the need for manual polling.

Instructions

轮询等待异步生成任务完成(success / fail),返回公开图片链接或失败原因。适合在 generate_image_async 之后直接调用,避免手动多次轮询。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
pollIntervalMsNo轮询间隔毫秒,默认 5000
timeoutSecondsNo最长等待秒数,默认 300
Behavior4/5

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

With no annotations, the description carries the burden. It discloses that the tool polls and waits for completion, returns a link or failure reason, and is a convenience wrapper to avoid manual polling. It does not explicitly describe timeout behavior, but the schema's timeoutSeconds parameter and the return of failure reasons provide reasonable coverage.

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?

The description is a single well-structured sentence that front-loads the core purpose, then adds the usage context. Every clause earns its place with no redundancy or 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?

Given the tool's moderate complexity (3 params, no output schema), the description provides the essential return type (public link or failure reason), the polling nature, and the intended call pattern after generate_image_async. It does not detail edge cases like timeout or invalid task IDs, but those are partially inferable from the schema and sibling context.

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 67% (pollIntervalMs and timeoutSeconds have descriptions; taskId is self-explanatory). The description adds no parameter-specific information beyond suggesting the tool avoids manual polling. This is adequate but not exceptional, so baseline 3 is appropriate.

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 the verb 'poll wait' (轮询等待) and the resource 'async generation task' (异步生成任务), and specifies it returns public image link or failure reason. It distinguishes itself from siblings like get_generation_task by explicitly mentioning it is meant to be called after generate_image_async and avoids manual polling.

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 gives explicit context: '适合在 generate_image_async 之后直接调用,避免手动多次轮询' (suitable for direct call after generate_image_async, avoiding manual polling). It clearly states when to use it and the benefit, but does not explicitly name alternatives or exclusion conditions.

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/exoticknight/labnana-mcp'

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