Paint strokes
strokePaint 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
| Name | Required | Description | Default |
|---|---|---|---|
| nib | No | Ribbon nib: 'round' or 'flat' (calligraphy, uses angle & roundness) | |
| tip | No | Dab tip: round, square, chalk, charcoal, sponge, splatter, cloud, leaf, grass, star, sparkle, heart, ring, triangle, hair, rake, particles (spray) — or set tipPath | |
| flow | No | Per-dab alpha 0..1 (low flow = build-up within the stroke) | |
| glow | No | Glow radius in px (neon / light effects) | |
| seed | No | Random seed (deterministic jitter); default auto | |
| size | No | Diameter in px at full pressure | |
| type | No | Engine: '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) | |
| angle | No | Tip / nib angle in degrees (0 = along +x, clockwise) | |
| bleed | No | 0..1 watercolor irregular blooming edges / mottling | |
| blend | No | normal, 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) | |
| brush | No | Brush 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 | |
| color | No | Paint color (any CSS color) | |
| count | No | Dabs per spacing step (with scatter: denser sprays) | |
| grain | No | 0..1 paper-grain strength (canvas-anchored texture eats pigment in the valleys) | |
| layer | No | Layer id, name, or index (0 = bottom, -1 = top). Default: the active layer. | |
| color2 | No | If set, color blends from `color` (start) to `color2` (end) along the stroke | |
| filter | No | For 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} | |
| pickup | No | 0..1 how much underlying color the brush picks up and mixes ('bristle') | |
| target | No | Paint the layer pixels (default) or its mask | |
| wobble | No | Hand-drawn wobble amplitude in px (smooth noise displacement) | |
| density | No | Dots per dab for tip 'particles' | |
| dryness | No | 0..1 gaps between bristles (dry brush / scumbling) ('bristle') | |
| opacity | No | Stroke opacity cap 0..1 (overlapping dabs within one stroke never exceed it) | |
| scatter | No | Random offset from the path, as a multiple of size | |
| spacing | No | Dab spacing as a fraction of current size (0.05 = dense, 1 = touching, 2+ = scattered stamps) | |
| strokes | Yes | Strokes to paint in order | |
| tipPath | No | Custom tip: SVG path in unit coords (-1..1, centered), e.g. "M0,-1 L1,1 L-1,1 Z" | |
| bristles | No | Number of bristles ('bristle' type) | |
| hardness | No | 0 (very soft airbrush edge) .. 1 (crisp edge). Round/square tips | |
| pressure | No | Pressure 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 | |
| strength | No | 0..1 smudge / filter-brush strength | |
| taperEnd | No | Length in px over which the stroke thins to a point at its end | |
| wetEdges | No | 0..1 watercolor edge darkening (pigment pools at the rim) | |
| hueJitter | No | Degrees of random hue variation per dab | |
| paintLoad | No | Paint runs out after ~this many px (0 = never). 'bristle' and 'dab' | |
| roundness | No | Tip aspect 0.05..1 (flat calligraphy nib ≈ 0.15-0.3) | |
| satJitter | No | 0..1 random saturation variation per dab | |
| smoothing | No | 0..1 smooths jittery input points before the spline | |
| flowJitter | No | 0..1 random per-dab alpha reduction | |
| grainScale | No | Grain texture scale (1 = default) | |
| sizeJitter | No | 0..1 random size variation per dab | |
| taperStart | No | Length in px over which the stroke grows from a point at its start | |
| angleJitter | No | Degrees of random rotation per dab (180 = fully random) | |
| lightJitter | No | 0..1 random lightness variation per dab | |
| wobbleScale | No | Wobble wavelength multiplier (bigger = lazier wobble) | |
| glowStrength | No | Glow intensity (default 1, can exceed 1) | |
| grainTexture | No | paper | rough | canvas | fine | noise | |
| particleSize | No | Dot radius for tip 'particles' (spray) | |
| pressureSize | No | 0..1 how much pressure shrinks size (1 = zero pressure → zero size) | |
| followDirection | No | Rotate tip with the stroke direction | |
| pressureOpacity | No | 0..1 how much pressure lowers per-dab alpha |