Skip to main content
Glama

doubao_image

Generates images from text prompts or reference images through Doubao web models, returning local file paths and image links; call login first when no session is active.

Instructions

用豆包网页版生成图片(文生图;给了 ref_images 就是图生图)。返回本地路径与图片链接。没登录时先调 doubao_login。

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": {
      "prompt": "<prompt>"
    },
    "name": "doubao_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo模型名:Seedream 5.0 Flash(免费推荐) / Seedream 4.5 / Seedream 4.0(默认) / Seedream 5.0 Pro(需订阅)
ratioNo图片比例,如 1:1、16:9、9:16、4:3、3:4;留空用配置默认值
styleNo风格 option_key,如 skill_image_styles_film;留空不加风格
inlineNo是否把图片本体以 base64 内联返回(体积大,默认 false 只给路径/链接)
promptYes要生成图片的画面描述,越具体越好
chat_idNo要继续的会话 id 或对话链接(https://www.doubao.com/chat/<id>);留空则沿用上次的对话
out_dirNo图片保存目录;留空用配置里的输出目录
new_chatNo是否强制新建对话;默认沿用上一次的对话继续生成
fit_ratioNo是否把结果裁剪/补边到请求比例,默认跟随配置
ref_imagesNo参考图本地绝对路径列表;非空时走图生图
context_modeNo上下文隔离:none 不隔离 / always 每次隔离 / auto 自动判断;留空跟随配置
timeout_secondsNo超时秒数,默认 180

Output Schema

NameRequiredDescriptionDefault
modelYes
ratioYes
imagesYes
noticeNo
promptYes
channelYes
chat_idNo
chat_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the return shape (local path plus image link) and the authentication prerequisite, but says nothing about the tool being slow web automation (a 180s default timeout exists in the schema), subscription-gated models, or what happens on session expiry or generation failure.

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 clauses: purpose and mode split, return value, auth prerequisite. The most decision-relevant information is front-loaded and there is no 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?

For a 12-parameter tool with a full output schema, the description covers purpose, mode selection, output shape, and the auth prerequisite, which is enough to invoke it correctly. The main remaining gap is that it never mentions that generation reuses the previous conversation by default (left to the schema) or that some models require a subscription.

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 100%, so the schema already documents all 12 parameters in detail, including that a non-empty ref_images switches to image-to-image. The description's mention of ref_images restates what the schema already says, adding no new meaning. Baseline 3 applies.

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 names a specific verb and resource (用豆包网页版生成图片) and immediately clarifies the two operating modes: text-to-image by default, image-to-image when ref_images is supplied. It also routes to the sibling doubao_login for the unauthenticated case, so an agent can identify and place the tool 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?

It states the selecting condition for the two modes (ref_images present vs absent) and the prerequisite step (call doubao_login first when not logged in). It does not cover exclusions or failure/retry situations, so it stops short of full when/when-not guidance.

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