Skip to main content
Glama

Paint: SVG path data

paint_path

Draw SVG path d data onto a named canvas layer to render curved or complex art, with fill, stroke, dashes, and even-odd fill control.

Instructions

Draw SVG path d data (M L H V C S Q T A Z, lowercase = relative) — the compact way for an agent to place curved or complex art. Supports fill, stroke, dashes, even-odd.

Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dYesContent of an SVG `d` attribute
capNoround
fillNoA colour, or a gradient object {type, from, to, radius, colors|stops}
blendNoBlend mode for this strokenormal
layerNoTarget layer index; defaults to the active layer (see paint_canvas).
scaleNoUniform scale around the origin
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
dashesNo
strokeNoA colour, or a gradient object {type, from, to, radius, colors|stops}
opacityNo0..1 strength of this stroke
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
even_oddNo
translateNoOffset by [dx, dy]
preview_sizeNoLongest edge of the returned thumbnail
stroke_widthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the mutation/safety profile (readOnly=false, destructive=false, idempotent=false), and 'Draw' is consistent with a write op. The description adds genuine context that 'layers, filters and undo work the same for every drawing tool,' disclosing recoverability. It does not explain whether it appends a new shape vs modifies existing art or what the call returns, so it's useful but not rich.

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?

Two short paragraphs, front-loaded with the core purpose and SVG command reference, then operational context. Little waste; every sentence is relevant, though the second paragraph's generalities apply to all drawing tools.

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 15-parameter tool with no output schema, the description covers the canvas prerequisite, layer targeting, and undo/filter behavior, but omits any mention of return/preview behavior (the preview param exists in schema) and coordinate/scale semantics. Adequate but with clear gaps for a tool this complex.

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 73%, so the schema already carries most parameter meaning (fill/stroke gradient shapes, preview modes, etc.). The description adds the SVG command set (M L H V C S Q T A Z, lowercase=relative) and field names (fill, stroke, dashes, even-odd, layer), but largely restates what the schema documents. Baseline 3 is appropriate.

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?

States a specific verb+resource ('Draw SVG path d data') and characterizes the tool's niche as 'the compact way for an agent to place curved or complex art,' which loosely distinguishes it from sibling primitives like paint_line/paint_rect/paint_ellipse. Differentiation is implied through the 'curved or complex' framing rather than an explicit sibling callout, so it stops short of a 5.

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?

It notes the canvas must be 'created with paint_canvas' and that a layer index is optional, which is useful context. However, it never states when to choose paint_path over paint_polygon/paint_line/brush for a given shape, leaving alternatives to inference.

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