Skip to main content
Glama

add_layer

Adds a column with its own drawing level to an OpenToonz scene, with vector/ink/raster modes plus optional style, parent, and boil settings; later layers draw on top.

Instructions

Add a column with its own drawing level. Later layers are drawn ON TOP. mode: 'vector' (shapes -> native OpenToonz vector .pli, editable in GUI, pressure lines) | 'ink' (a vector .pli you and the user both draw on, stroke by stroke: stroke / read_drawing / erase_stroke) | 'raster' (PNG). style: override scene style for this layer (e.g. 'clean' for BG, 'sketch' for effects). parent: 'Table', a peg or another layer. boil: hand-drawn line boil on held drawings.

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": {
      "scene": "<scene>",
      "layer": "<layer>"
    },
    "name": "add_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
boilNo
modeNovector
layerYes
sceneYes
styleNo
parentNoTable

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and adds meaningful behavioral detail: layer stacking order, vector/ink/raster modes, editing behavior, pressure lines, style override, parent options, and line boil. It still omits return behavior and error or permission considerations, but it discloses substantially more than the schema alone.

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?

The description is dense but front-loaded, starting with the tool's purpose and drawing order before moving into parameter-specific notes. The compact mode/parameter formatting earns its space, though the long parenthetical mode details make it somewhat harder to scan quickly.

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 six-parameter mutation tool with no annotations and no output schema, the description provides solid behavioral context and explains most optional parameters. It remains incomplete because the required scene and layer parameters are never defined and no return or failure behavior is described.

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 0%, so the description must define the parameters. It explains mode, style, parent, and boil meaningfully, but it does not explain the required scene and layer parameters, leaving two of six parameters, including both required ones, semantically underspecified.

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 description clearly states that this tool adds a column/layer with its own drawing level and notes that later layers are drawn on top. It is generally distinguishable from delete_layer and set_layer, though it does not explicitly disambiguate itself from related creation tools such as add_peg or ink_layer.

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

Usage Guidelines3/5

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

The description gives useful guidance for choosing mode, style, parent, and boil settings, including examples such as 'clean' for backgrounds and 'sketch' for effects. However, it does not explicitly state when to use add_layer instead of sibling tools like add_peg or ink_layer, nor does it provide when-not-to-use guidance.

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