Skip to main content
Glama

AiProductDetailImage

AI 电商详情图:根据产品图和文案要求,生成电商详情页所需的各个模块图片,并额外把模块图按顺序纵向拼成一张详情长图。本工具提交后立即返回任务信息,不阻塞等待生成;请按返回的轮询参数调用 GetTask 取结果。

【上传产品图】本工具不接收 base64 或 URL,只接收文件 id:

  1. 先调用 CreateUploadUrl 拿到 fileId 与 uploadUrl;

  2. uploaded=false 时把文件字节 PUT 到 uploadUrl,必须让命令读取文件内容(curl 用 --data-binary @文件路径,漏掉 @ 会把路径字符串当内容上传且仍返回 200),上传后核对字节数与本地文件大小一致;

  3. 把 fileId 填入 productImages。

【必填字段】

  • productImages:产品图文件 id(由 CreateUploadUrl 返回),1-4 张。 仅支持 JPG / PNG / WebP,单张不超过 10MB,图片宽高需在 100-4096 px 之间; 上传前先确认符合要求,不符合时提示用户更换图片。

  • ratio:图片比例,展示 9:21 / 1:1 / 3:4 / 9:16 / 16:9 让用户勾选; 用户未指定时使用 9:21。

  • selectedModules:要生成的详情页模块,多选,至少一项;选中哪个模块就生成 1 张该模块图片。 · 首屏主视觉(传递核心价值) · 场景氛围图(展示使用场景氛围) · 商品成分图(展示配方成分) · 详细规格/参数表(展示详细商品数据) · 用户痛点图(展现用户当前痛点) · 效果对比图(使用前后效果对比) · 使用场景图(呈现真实使用场景) · 商品细节图(展示料体与包装细节) · 核心功效卖点图(突出功效优势) · 使用建议图(提供产品使用方式建议) · 系列展示图(多配色或多SKU展示) · Q&A(解答用户疑问) · 品牌故事图(传达品牌理念)

【可选字段】以下字段都可以不填,用户没提就用默认值:

  • country:投放国家,默认「中国」。用户提到其他国家时按其说法传入。

  • language:文案语言,默认「中文」。用户提到其他语言时按其说法传入。

  • productName:产品名称,默认空。

  • productCategory:产品品类,默认空。

  • productIntroduction:产品介绍(卖点、功效、成分专利、使用方式等),默认空。 开始生成前,请主动告诉用户可以补充这些信息(国家、语言、产品名称、产品品类、产品介绍), 让用户自己决定是否填写;用户不提供时直接用默认值继续,不要反复追问。

【异步与轮询】成功提交后返回 JSON:taskId、initialSleepSeconds、intervalSeconds。 先按 initialSleepSeconds 等待,再按 intervalSeconds 间隔调用 GetTask(taskId),直到 status 为 completed(取 result;各模块图在前,纵向拼接的详情长图在最后)或 failed。 图片 URL 有时效性,请立即下载到本地保存后再使用或展示,不要把链接原样转给用户当作最终结果。 GetTask 完成后的 message 按用户当前对话语言翻译,不要强行中文;Markdown 链接必须完整保留,链接地址不要改。

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

【模块怎么选】由用户多选,每个模块固定生成 1 张:

  • 向用户确认或展示时,用用户当前对话语言翻译模块名称,不要强行中文;调用工具时 selectedModules 仍须传上面的中文枚举原值,不要翻译。

  • 直接让用户勾选模块,不要询问每个模块要几张,也不要用数量表达。

  • 至少选择一项;严禁组合成「标准 / 精简 / 全套」之类套餐让用户选,也不要替用户决定。

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": {
      "productImages": "<productImages>",
      "ratio": "<ratio>",
      "selectedModules": "<selectedModules>"
    },
    "name": "AiProductDetailImage"
  }
}

Input Schema

NameRequiredDescriptionDefault
ratioYes图片比例,必填。展示选项让用户勾选;用户未指定时使用 9:21。
countryNo投放国家,可选,默认中国。用户提到其他国家时按其说法传入。中国
languageNo文案语言,可选,默认中文。用户提到其他语言时按其说法传入。中文
productNameNo产品名称,可选,默认空。
productImagesYes产品图文件 id,必填,1-4 张。文件 id 由 CreateUploadUrl 返回(32 位 md5)。仅支持 JPG / PNG / WebP,单张不超过 10MB,图片宽高需在 100-4096 px 之间。不接收 base64 或 URL。
productCategoryNo产品品类,可选,默认空。例如精华液、爽肤水、粉底液等。
selectedModulesYes要生成的详情页模块,多选,至少选择一项。选中哪个模块就生成 1 张该模块图片,不区分张数。枚举值必须原样传入(中文模块名),不要翻译。向用户确认或展示时按用户当前对话语言翻译模块名称,不要强行中文。
productIntroductionNo产品介绍:产品卖点、产品功效、成分专利、使用方式等,可选,默认空。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false, idempotentHint=false), it discloses the async contract: it returns task info immediately instead of blocking, the exact polling parameters, and the status values that end polling. It also warns that image URLs expire and must be downloaded locally, and that media links are server-signed short codes that must be used verbatim. That is substantial behavioral context that the annotations cannot convey.

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?

The purpose is front-loaded and the bracketed section headers make the long body navigable. However, the definition is extremely long, and several passages (image constraints, defaults, module enumeration) restate the input schema almost word for word rather than adding information. The 【回复要求】 block is lengthy for what is essentially a formatting rule.

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?

With no output schema, the description carries the full burden of explaining what comes back, and it does: the returned JSON fields, the ordering of result images with the stitched long image last, and the completed/failed terminal states. For an async 8-parameter generation tool, an agent has everything needed to submit, poll, and present results correctly.

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%, so the schema already carries the defaults and constraints, and the baseline would be 3. The description adds genuine meaning on top: the fileId-only upload workflow with the curl --data-binary @ pitfall, the rule that each selected module yields exactly one image, and the instruction to send untranslated Chinese enum values while displaying translated names to the user. Some of the 必填字段 text duplicates the schema verbatim, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a concrete verb and resource: generates each module image required by an e-commerce detail page from product images plus copy, and additionally stitches the module images vertically into one long detail image. The scope is unambiguous. It never names a competing sibling (e.g. AiProductImageSet or ProductRendering) or explains how it differs from them, so it falls short of the 5 bar for sibling differentiation.

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?

It gives explicit when-to guidance for the upstream and downstream steps: call CreateUploadUrl first for fileId/uploadUrl, and call GetTask(taskId) at initialSleepSeconds/intervalSeconds until completed or failed. It also states clear when-not rules: don't pass base64/URLs, don't repeatedly ask the user for optional fields, don't offer package tiers, and don't ask for per-module counts. It stops short of routing between this tool and sibling image-generation tools, so it is strong but not fully complete.

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