Skip to main content
Glama

paint_pattern

Fills polygons, rectangles, selections, or whole layers with hatch, stipple, halftone, or dither patterns for stylized shading, texture, and tonal effects.

Instructions

Pattern fill drawn by the engine inside points (polygon; smooth=true for curves), rectangle, or the selection/whole layer. hatch: lines at angle (degrees, clockwise from +x) or angles=[45,-45] crosshatch, spacing/width px, jitter 0..1 (hand-made breaks, wobble, offsets), taper 0..1 dash ends, dash [on,off]. stipple: random dots, spacing = mean distance, size diameter, size_jitter, density = keep probability. halftone: dot grid at angle with pitch spacing, dot diameter size*sqrt(level) (Ben-Day, print screens). dither: ordered Bayer 8x8 with cell px art pixels (pixel-art gradients). density 0..1 (default hatch 1, others 0.5) and gradient {type: linear|radial, start:[x,y], end:[x,y], from, to} set the tone; texture 0..1 adds document-fixed paper grain. Patterns are anchored to the document, so adjacent fills continue seamlessly.

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": {
      "kind": "<kind>"
    },
    "name": "paint_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellNo
dashNo
kindYes
seedNo
sizeNo
angleNo
colorNo
taperNo
widthNo
anglesNo
jitterNo
pointsNo
smoothNo
densityNo
opacityNo
spacingNo
textureNo
gradientNo
layer_idNoTarget layer id or unique layer name; the active layer stays unchanged. Default: active layer
rectangleNo
blend_modeNonormal
document_idNoTarget this document instead of the shared active one (recommended when several agents share the server)
size_jitterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose some real behavior: patterns are document-anchored so adjacent fills tile seamlessly, and per-kind density defaults are given (hatch 1, others 0.5). It is silent on the mutation profile that matters most here — whether the paint is destructive, undoable, what opacity/blend_mode do, and what color defaults to when null.

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 and telegraphic, but front-loaded with the target geometry before the per-kind parameter groups, so an agent can stop reading once it finds its kind. Every clause carries parameter meaning; the style is compressed rather than padded, though the run-on hatch/stipple sentences take effort to parse.

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 23-parameter mutation tool with no annotations and no output schema, the definition covers most parameters and the region model well. It is still missing what the call returns, whether it is undoable/destructive, and how color/opacity/blend_mode interact with the generated pattern.

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 coverage is only 9%, so the description must carry parameter meaning, and it largely does: angle in clockwise degrees from +x, angles for crosshatch, spacing/width in px, jitter 0..1 semantics, taper for dash ends, dash [on,off], stipple spacing as mean distance and size as diameter, halftone pitch with dot diameter size*sqrt(level), dither Bayer 8x8 cell in art pixels, and the gradient object shape. Gaps remain for color, opacity, blend_mode, and seed, the last of which is a meaningful randomization control left undefined.

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 first sentence states a specific verb and resource: a pattern fill drawn by the engine inside points/rectangle/selection/whole layer. It also enumerates the four pattern kinds (hatch, stipple, halftone, dither), so an agent knows exactly what will be produced. It does not explicitly contrast with the likely sibling paint_fill (solid fill), leaving that distinction to inference.

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?

Target selection is explained well (polygon points with smooth=true for curves, rectangle, or fallback to selection/whole layer), which is genuine when-to-use context. However, there is no explicit guidance on when to prefer this over paint_fill or paint_shape, and no prerequisites or exclusions are stated.

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