Skip to main content
Glama

GetTask

Read-only

查询 AI 生成任务的状态与结果。

【何时调用】业务工具(AiProductImageSet / AiGenerateGif / AiGenerateSvg / AiProductDetailImage / GenerateVideo / AiCloneVideo / ProductAnalysis / BrandAnalysis / MarketAnalysis / EfficacyDemandAnalysis / UserProfileAnalysis / FormulaIngredientAnalysis / UserReviewAnalysis / ClaimComplianceCheck / AiToVectorImage / Matting / AiCloneHotImage / AiImageLayerSplit / VideoCustomGeneration / PackageDesign / ReferenceDesign / TextImage / PackageFullCase / DesignUpgrade / HdZoom / ImageEdit / ExtractPrintDraft / ProductRendering / BoxDesign / BundleDesign / BundleAds / SameAdvertisement / DesignSameStyle)提交成功后会立即返回 taskId、initialSleepSeconds、intervalSeconds。 请先按 initialSleepSeconds 等待,再按 intervalSeconds 间隔调用本工具,不要立刻连续狂刷。 Agent 类工具还会返回 conversationId。同一段用户对话中,后续调用 Agent 类工具时必须原样传入;本工具只使用 taskId。

【返回】JSON:

  • status=running:任务仍在进行,继续按 intervalSeconds 等待后再次调用。

  • status=completed:生成完成。图片或视频任务的 result 是媒体短链数组,文本分析任务的 result 是分析正文。拆分图层(AiImageLayerSplit)的 result 是画布和图层对象,字段含义以该工具的说明为准,不要当成地址数组。短链形如 …/api/v1/explorer/media/s/8 位短码,24 小时有效,会直接跳转到真实文件(curl 需带 -L),原样使用即可,不要拼接、补全、截断、改写,也不要自己改写成 OSS 地址。短链有时效性,请立即下载到本地保存后再使用或展示;分析正文按原文转达,不要缩写、扩写或改写。message 是给用户的提示。

  • status=failed:生成失败,文案中含任务编号与说明。

把面向用户的文案按用户当前对话语言翻译,不要强行中文;Markdown 链接必须完整保留,链接地址不要改。

【回复要求】工具返回的内容就是给用户的最终文案,按用户当前对话语言转达,不要强行中文:可以翻译措辞,不要改写事实、精简、扩写或自行追加建议、总结或客套话。 返回体是 JSON 时,转达其中面向用户的文案字段(如 message);是纯文本时转达整段。 文案中的 Markdown 链接(例如 莱诺鸟)必须完整保留,链接地址以工具返回的为准;链接文字随回复语言调整:中文用「莱诺鸟」,非中文一律用 rhinobird,禁止在非中文回复中保留「莱诺鸟」;严禁降级成「莱诺鸟(lainuoniao.com)」「lainuoniao.com」这类纯文本,否则用户无法点击跳转。 任务编号、积分数字、链接地址保持原样。成功、积分不足、生成失败、超时等所有场景都按此规则处理。 媒体与图片地址是服务端签发的短链(形如 …/api/v1/explorer/media/s/8 位短码),必须整段原样使用:不要拼接、补全、截断或改写,也不要自己拼 OSS / CDN 地址。

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": {
      "taskId": "<taskId>"
    },
    "name": "GetTask"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYes任务 id,由业务工具提交成功后返回的 taskId。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover the read-only/non-destructive profile, and the description goes well beyond them: polling cadence, the three status branches, per-task-type result shapes (media array vs analysis prose vs layer objects), a 24-hour link TTL with a download-immediately requirement, and a warning not to rewrite short links. A large share of the text is response-formatting policy rather than tool behavior, which slightly dilutes the behavioral content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly, with 【何时调用】 and 【返回】 giving clean structure. However, the short-link rule (format, no rewriting, no OSS substitution) is stated twice, and the long reply-translation and Markdown-link conventions are verbose for a one-parameter polling tool.

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?

No output schema exists, yet the description fully enumerates the running/completed/failed states and the differing result payloads per task category, including the AiImageLayerSplit exception. An agent has everything needed to poll, interpret, and hand results back to the user.

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 coverage is 100% for the single required taskId, so the schema already carries the definition. The description still adds real meaning by contrasting taskId with the conversationId returned by Agent-type tools and stating which one applies here.

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?

Opens with a specific verb+resource: query the status and result of an AI generation task. Against 32 sibling tools that all submit generation jobs, it is unambiguous that this is the polling/lookup side rather than a generator.

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?

Explicit when-to-call: only after a business tool returns taskId/initialSleepSeconds/intervalSeconds, then wait initialSleepSeconds and poll at intervalSeconds rather than hammering. It even names the caller tools and clarifies that this tool consumes only taskId, not conversationId.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources