Skip to main content
Glama

Paint strokes

stroke

Paint hand-drawn brush strokes with configurable brushes, pressure, and blend modes to draw, blend, or erase artwork on canvas layers or masks.

Instructions

Paint one or more hand-drawn brush strokes. Top-level brush params are defaults for every stroke; each stroke can override any of them. Coordinates are canvas px (origin top-left, +y down). Points [x,y,pressure]: pressure 0..1 drives size/opacity per the brush (pressureSize/pressureOpacity). Tips: use several strokes per call; vary pressure for life; taperStart/taperEnd for pointed ends; blend:"erase" to erase; brush "smudge"/"blender" to blend paint; target:"mask" paints a layer mask (paint = reveal, blend "erase" = hide). Use list_brushes to see all presets and parameters.

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

Input Schema

NameRequiredDescriptionDefault
nibNoRibbon nib: 'round' or 'flat' (calligraphy, uses angle & roundness)
tipNoDab tip: round, square, chalk, charcoal, sponge, splatter, cloud, leaf, grass, star, sparkle, heart, ring, triangle, hair, rake, particles (spray) — or set tipPath
flowNoPer-dab alpha 0..1 (low flow = build-up within the stroke)
glowNoGlow radius in px (neon / light effects)
seedNoRandom seed (deterministic jitter); default auto
sizeNoDiameter in px at full pressure
typeNoEngine: 'dab' (stamped tips), 'ribbon' (smooth vector ink, variable width), 'bristle' (oil/acrylic bristles with paint load & color pickup), 'smudge' (drags existing pixels), 'filter' (paints a filter effect, see `filter`), 'pixel' (hard aliased squares)
angleNoTip / nib angle in degrees (0 = along +x, clockwise)
bleedNo0..1 watercolor irregular blooming edges / mottling
blendNonormal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity, add, erase, behind (paint under existing pixels), atop (only on existing pixels)
brushNoBrush preset or custom brush name. Presets: pencil, graphite, fineliner, ink, brush-pen, calligraphy, marker, hard-round, soft-round, airbrush, watercolor, wash, gouache, oil, acrylic, dry-brush, fan, charcoal, chalk, crayon, spray, splatter, stipple, sponge, foliage, grass, stars, sparkle, cloud, fur, neon, glaze, smudge, blender, blur, dodge, burn, saturate, eraser, soft-eraser, pixel
colorNoPaint color (any CSS color)
countNoDabs per spacing step (with scatter: denser sprays)
grainNo0..1 paper-grain strength (canvas-anchored texture eats pigment in the valleys)
layerNoLayer id, name, or index (0 = bottom, -1 = top). Default: the active layer.
color2NoIf set, color blends from `color` (start) to `color2` (end) along the stroke
filterNoFor type 'filter': a filter spec painted along the stroke, e.g. {type:'blur', radius:6} or {type:'exposure', ev:0.6} (dodge) / {ev:-0.6} (burn), {type:'hue_saturation', saturation:40}
pickupNo0..1 how much underlying color the brush picks up and mixes ('bristle')
targetNoPaint the layer pixels (default) or its mask
wobbleNoHand-drawn wobble amplitude in px (smooth noise displacement)
densityNoDots per dab for tip 'particles'
drynessNo0..1 gaps between bristles (dry brush / scumbling) ('bristle')
opacityNoStroke opacity cap 0..1 (overlapping dabs within one stroke never exceed it)
scatterNoRandom offset from the path, as a multiple of size
spacingNoDab spacing as a fraction of current size (0.05 = dense, 1 = touching, 2+ = scattered stamps)
strokesYesStrokes to paint in order
tipPathNoCustom tip: SVG path in unit coords (-1..1, centered), e.g. "M0,-1 L1,1 L-1,1 Z"
bristlesNoNumber of bristles ('bristle' type)
hardnessNo0 (very soft airbrush edge) .. 1 (crisp edge). Round/square tips
pressureNoPressure profile along the stroke (multiplies per-point pressure): a number, an array of evenly spaced values e.g. [0.2,1,0.4], or one of: constant, taper, taper-start, taper-end, swell, fade-in, fade-out, pulse, heavy, light
strengthNo0..1 smudge / filter-brush strength
taperEndNoLength in px over which the stroke thins to a point at its end
wetEdgesNo0..1 watercolor edge darkening (pigment pools at the rim)
hueJitterNoDegrees of random hue variation per dab
paintLoadNoPaint runs out after ~this many px (0 = never). 'bristle' and 'dab'
roundnessNoTip aspect 0.05..1 (flat calligraphy nib ≈ 0.15-0.3)
satJitterNo0..1 random saturation variation per dab
smoothingNo0..1 smooths jittery input points before the spline
flowJitterNo0..1 random per-dab alpha reduction
grainScaleNoGrain texture scale (1 = default)
sizeJitterNo0..1 random size variation per dab
taperStartNoLength in px over which the stroke grows from a point at its start
angleJitterNoDegrees of random rotation per dab (180 = fully random)
lightJitterNo0..1 random lightness variation per dab
wobbleScaleNoWobble wavelength multiplier (bigger = lazier wobble)
glowStrengthNoGlow intensity (default 1, can exceed 1)
grainTextureNopaper | rough | canvas | fine | noise
particleSizeNoDot radius for tip 'particles' (spray)
pressureSizeNo0..1 how much pressure shrinks size (1 = zero pressure → zero size)
followDirectionNoRotate tip with the stroke direction
pressureOpacityNo0..1 how much pressure lowers per-dab alpha

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description does real work: it discloses the pixel coordinate convention (+y down), the top-level-defaults-with-per-stroke-override inheritance rule, and the mask semantics where painting reveals and erasing hides. However, for a mutating paint operation it never says whether strokes are undoable, whether a canvas/layer must already exist, or what the call returns, leaving meaningful behavioral gaps.

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?

Dense but well organized: purpose first, then coordinate/units, then pressure model, then a Tips block, then a pointer to list_brushes. Every sentence carries information, though the Tips line packs many semicolon-separated hints that are harder to scan than the rest.

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?

Given 51 parameters, nested stroke objects, and no output schema, the description covers the essential mental model: coordinates, defaults inheritance, pressure, and the mask/erase/blend special cases. What is missing is post-call behavior (return value, undo interaction), which matters for a destructive paint tool but is a narrower gap than the parameter space would suggest.

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

Parameters4/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, but the description adds meaning the schema does not: that top-level brush params act as defaults for every stroke and each stroke may override any of them, plus the pressure 0..1 -> pressureSize/pressureOpacity linkage. It also points to list_brushes for enumerating presets and parameters, which the schema does not do.

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 concrete verb and resource ('Paint one or more hand-drawn brush strokes') and immediately scopes the coordinate system and pressure model. It is clearly distinguishable from siblings like shape, fill, or filter, and it names list_brushes as the discovery path for brush presets.

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?

The Tips block gives actionable when-to-use guidance: batch several strokes per call, vary pressure, use taperStart/taperEnd for pointed ends, blend:'erase' to erase, smudge/blender to blend, and target:'mask' with the paint=reveal / erase=hide rule. It stops short of explicit exclusions (e.g., when to prefer shape or fill instead), so it is clear but not fully comparative.

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