Skip to main content
Glama

seedream_layer_decompose

Split an image into independent layers by naming elements or bounding boxes in the prompt, then download each layer for editing or compositing.

Instructions

Split ANY image into independent layers with Seedream 5.0 (billed per OUTPUT layer incl. base). tier="pro" (default): 7 cr @1K, 14 @2K, so a 3-layer split ≈ 21 cr. tier="flash" (NEW): 3.24 cr/layer at any size, so ≈ 10 cr. Works on any public image URL (upload local files with upload_file first). Describe which elements become layers in the prompt, optionally bounding them with x1 y1 x2 y2 tags. Downloads every layer image to kie/assets/raw/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoauto, 1K, 1.5K or 2K. Pro: 7 cr/layer at 1K/1.5K, 14 at 2K. Flash: 3.24 at any size.auto
tierNopro = Seedream 5.0 Pro (7 cr/layer @1K, 14 @2K; prompt required). flash = Seedream 5.0 Flash (NEW: 3.24 cr/layer at any size; prompt optional — but WITHOUT a prompt it splits out every element: a poster gave 12 layers = 38.9 cr. Name the elements you want to cap the layer count).pro
promptNoWhich elements to separate into layers, e.g. "Separate the title text <bbox>179 58 809 197</bbox> and the parrot <bbox>330 274 641 991</bbox> into independent layers"
filenameNoBase output filename; layers get -2, -3... suffixes
image_urlYesPublic URL of the source image (singular — one image per call)
download_dirNoAbsolute directory to save into (created if missing). Defaults to the server's kie/assets/raw/.
output_formatNopng recommended for transparencypng

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv5.5.0
    • changedInput schema / properties / size / description
      Previous value: -"1K/1.5K = 7 cr per layer, 2K = 14"New value: +"auto, 1K, 1.5K or 2K. Pro: 7 cr/layer at 1K/1.5K, 14 at 2K. Flash: 3.24 at any size."
    • addedInput schema / properties / tier
      Added value: +{
      +  "default": "pro",
      +  "description": "pro = Seedream 5.0 Pro (7 cr/layer @1K, 14 @2K; prompt required). flash = Seedream 5.0 Flash (NEW: 3.24 cr/layer at any size; prompt optional — but WITHOUT a prompt it splits out every element: a poster gave 12 layers = 38.9 cr. Name the elements you want to cap the layer count).",
      +  "enum": [
      +    "pro",
      +    "flash"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "image_url",
      -  "prompt"
      -]New value: +[
      +  "image_url"
      +]
  2. Addedv5.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the per-output-layer credit model, the exact flash-vs-pro cost tradeoff, the 12-layer/38.9 cr failure mode of promptless flash, and the download destination (kie/assets/raw/). It omits call mechanics an agent needs, such as whether this is synchronous or returns a task id for check_task, and whether existing files are overwritten.

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

Conciseness4/5

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

Front-loaded with the action and cost, then tiers, then input/output mechanics. It is a dense single paragraph with heavy billing detail, but each clause carries operational information rather than 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?

Seven parameters are all covered and the cost model plus download location are explained, which matters since there is no output schema. The remaining gap is execution semantics (sync vs task-based, failure behavior), which an agent would need for a multi-credit generative call.

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 baseline is 3. The description restates the tier/size pricing and the <bbox> tag syntax already present in the schema's prompt description; its only additive detail is the '-2, -3...' filename suffix convention, which is marginal.

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 opens with a specific verb and resource: 'Split ANY image into independent layers with Seedream 5.0'. That is unambiguous and distinct from every sibling tool (audio, video, TTS, upscaling), so an agent can route to it 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 gives real routing guidance: local files must go through upload_file first, prompt is required for tier=pro but optional for tier=flash, and omitting the prompt on flash causes unbounded layer counts. It doesn't state hard exclusions (e.g. no video input), so it falls just short of a full when/when-not matrix.

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