Skip to main content
Glama

stroke

Draw pen lines directly into an OpenToonz ink layer at a given frame. Each line is written into the vector level on top of existing artwork, so nothing is regenerated or overwritten.

Instructions

Draw by hand on an ink layer: each stroke is one pen line, written straight into the OpenToonz vector level on top of what is already there (yours or the user's). Nothing is regenerated or overwritten.

strokes: [{"points": [[x, y] or [x, y, pressure 0-1], ...], "width": px at full pressure (default: the style's line), "color": '#rrggbb', "closed": false, "smooth": true}]. Points are canvas px (origin top-left); the line passes through every point (smooth=false joins them with straight segments). Without pressure values the ends are tapered like a pen lift (taper 0 = none, 1 = to a hair). Work like an artist: read_drawing / preview_frame to look, add a few strokes, look again. Lines only: painted areas are made in OpenToonz, or with draw on a vector layer.

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>",
      "frame": "<frame>",
      "strokes": "<strokes>"
    },
    "name": "stroke"
  }
}

Input Schema

NameRequiredDescriptionDefault
frameYes
layerYes
sceneYes
taperNo
strokesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.4/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: 'Nothing is regenerated or overwritten' and drawing 'on top of what is already there (yours or the user's)' clearly disclose additive, non-destructive behavior. It omits error handling, undo/rollback, and any permission constraints, so a small gap remains.

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 purpose and non-destructive guarantee come first, followed by the payload format and then workflow guidance, so it is well front-loaded. The array-specification block is dense but each clause (coordinates, pressure, taper) carries distinct information, with little waste.

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 5-parameter mutation tool with no annotations and no output schema, the description covers payload format, coordinate semantics, taper behavior, visual workflow, and a scope limitation (lines only). It does not describe what is returned or what happens on an invalid layer/frame, which are the remaining gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 compensate and largely does: it specifies the `strokes` item shape (points as [x,y] or [x,y,pressure 0-1], width as px at full pressure with a default, color '#rrggbb', closed, smooth), the coordinate origin (canvas px, top-left), and the meaning of `taper` from 0 to 1 with its default. Only scene/layer/frame are left to the schema, and those are self-evident.

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?

It names a specific verb and resource ('Draw by hand on an ink layer: each stroke is one pen line') and states exactly where the output lands ('written straight into the OpenToonz vector level'). The closing 'Lines only: painted areas are made in OpenToonz, or with draw on a vector layer' explicitly separates it from the `draw` sibling, so an agent can choose without opening a 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 a concrete workflow ('read_drawing / preview_frame to look, add a few strokes, look again') that names the alternatives for the inspect-then-act loop, and it excludes one case (painted areas) by routing them elsewhere. It stops short of stating prerequisites such as whether the scene/layer must already exist, so it is strong but not exhaustive.

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