Skip to main content
Glama

decompose_layers

Separates an image into distinct layers via Seedream, returning task ID, status, and output URLs. Provide an image URL and optional separation prompt.

Instructions

Create a Seedream task on RunAPI (decompose layers). Returns a task id, status, and output URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoDeclared type: string. Known values: "auto", "1K", "1.5K", "2K".
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptNoOptional instructions describing which elements to separate. Declared type: string.
image_urlYesExactly one public PNG, JPEG, WebP, BMP, TIFF, or GIF image URL; HEIC and HEIF are unsupported. Maximum 30 MB, 262,144-36,000,000 total pixels, and aspect ratio 1:16-16:1. Declared type: string.
timeout_msNo
callback_urlNoDeclared type: string.
output_formatNoBase image format. Separated layers are PNG. Declared type: string. Known values: "png", "jpeg".
poll_interval_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.2.0
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • addedInput schema / properties / callback_url / description
      Added value: +"Declared type: string."
    • changedInput schema / properties / image_url / description
      Previous value: -"Exactly one public PNG, JPEG, WebP, BMP, TIFF, or GIF image URL; HEIC and HEIF are unsupported. Maximum 30 MB, 262,144-36,000,000 total pixels, and aspect ratio 1:16-16:1."New value: +"Exactly one public PNG, JPEG, WebP, BMP, TIFF, or GIF image URL; HEIC and HEIF are unsupported. Maximum 30 MB, 262,144-36,000,000 total pixels, and aspect ratio 1:16-16:1. Declared type: string."
    • removedInput schema / properties / image_url / pattern
      Removed value: -"^https?:\\/\\/"
    • removedInput schema / properties / model / enum
      Removed value: -[
      -  "seedream-5-pro-layer-decomposition"
      -]
    • changedInput schema / properties / output_format / description
      Previous value: -"Base image format. Separated layers are PNG."New value: +"Base image format. Separated layers are PNG. Declared type: string. Known values: \"png\", \"jpeg\"."
    • removedInput schema / properties / output_format / enum
      Removed value: -[
      -  "png",
      -  "jpeg"
      -]
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / prompt / description
      Previous value: -"Optional instructions describing which elements to separate."New value: +"Optional instructions describing which elements to separate. Declared type: string."
    • removedInput schema / properties / prompt / maxLength
      Removed value: -5000
    • addedInput schema / properties / size / description
      Added value: +"Declared type: string. Known values: \"auto\", \"1K\", \"1.5K\", \"2K\"."
    • removedInput schema / properties / size / enum
      Removed value: -[
      -  "auto",
      -  "1K",
      -  "1.5K",
      -  "2K"
      -]
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  2. Addedv0.1.9

TDQS

C2.9/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 (task id, status, output URLs), which matters because there is no output schema, but it omits async/polling behavior implied by the 'wait' parameter, cost implications, and auth requirements.

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?

Two short, front-loaded sentences with no filler. The parenthetical '(decompose layers)' is slightly redundant with the tool name, but overall it is tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter task-creation tool with no annotations and no output schema, the description covers the return shape but leaves async behavior, cost, and failure/validation conditions unstated. Adequate but with clear gaps.

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 78%, so most parameters are already documented in the schema. The description adds no parameter-level meaning (e.g., what 'prompt' controls, what 'size' affects), so baseline 3 applies for high-coverage schemas.

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

Purpose3/5

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

The description states a verb (Create) and an object (a Seedream task on RunAPI), and the parenthetical repeats the tool name rather than explaining what locating/decomposing layers produces. An agent can tell it is image-layer separation, but not what the output layers mean or how it differs functionally from edit_image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus the siblings (edit_image, text_to_image) or any prerequisite conditions. The only implicit cue is the name itself, which is not guidance.

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