Skip to main content
Glama

Split an image into layers

split_into_layers

Split a flat image (PNG, JPG or WebP, at least 512 × 512 px) into named transparent layers, with the hidden parts behind objects filled in. Costs 1 credit per layer returned (up to 17 by default, or up to 100 when prompt lists or asks for more parts); the account needs at least 5 credits to start. Pass the image as a public https URL or as base64. Waits up to 50 seconds; if it is still processing, call get_layers later.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "split_into_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptNoOptional: what to separate, in plain words, e.g. "the cat, the sofa and the background". Leave empty to let the model decide (up to 17 layers), or list/ask for more parts to allow up to 100 layers.
image_urlNoPublic https URL of the image.
image_base64NoThe image as base64, with or without a data: prefix. Use when there is no URL.
wait_secondsNoHow long to wait for the result before returning, 0 to 50 seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / prompt / maxLength
      Previous value: -500New value: +1500
  2. Changed1 schema field changed
    • changedInput schema / properties / prompt / description
      Previous value: -"Optional: what to separate, in plain words, e.g. \"the cat, the sofa and the background\". Leave empty to let the model decide."New value: +"Optional: what to separate, in plain words, e.g. \"the cat, the sofa and the background\". Leave empty to let the model decide (up to 17 layers), or list/ask for more parts to allow up to 100 layers."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare openWorldHint and destructiveHint=false; the description adds substantially more: a per-layer credit cost, the credit floor to start, the default 17-layer cap versus 100 with an explicit prompt, and the 50-second wait/polling model. Those are exactly the operational facts an agent needs before spending credits.

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?

A single dense paragraph that front-loads the core action, then formats/size constraints, then cost, then input modes, then timing. Every clause carries an operational fact; nothing is repeated or 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?

With no output schema, the description still conveys what comes back ('named transparent layers') and what to do when the result isn't ready. It doesn't describe the shape of the layer objects or how to retrieve results from get_layers, but that is reasonably delegated to the sibling tool.

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 coverage is 100%, so the baseline is 3; the description largely restates schema content (URL vs base64, the 50-second wait, prompt-driven layer counts). The one piece of added meaning is that the prompt choice directly controls the 17-vs-100 layer cap and therefore the cost, but this is already implied in the prompt field description.

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?

States a specific verb and resource ('Split a flat image ... into named transparent layers') plus the differentiating behavior ('hidden parts behind objects filled in'). It also implicitly distinguishes itself from get_layers, which is named as the follow-up for unfinished work.

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?

Gives clear preconditions (PNG/JPG/WebP, at least 512×512, 5 credits minimum) and an explicit fallback path: 'if it is still processing, call get_layers later.' It doesn't state when not to use this tool versus unlock_layers or other siblings, which keeps it from a 5.

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