Skip to main content
Glama

Paint: Transform a layer or the canvas

paint_transform
Destructive

Scale, rotate, flip, or translate one layer, or crop, resize, and trim the whole canvas, to adjust drawings before export.

Instructions

scale | rotate | flip | translate on one layer; crop | resize | trim on the whole canvas. Bilinear resampling; trim shrinks to painted content.

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
xNo
yNo
axisNohorizontal
modeYes
layerNoTarget layer index; defaults to the active layer (see paint_canvas).
widthNo
anchorNocenter
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
factorNoscale multiplier
heightNo
degreesNo
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
backgroundNoBottom-layer colour when growing the canvas
preview_sizeNoLongest edge of the returned thumbnail

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine behavioural context beyond that: bilinear resampling quality and the fact that 'trim' shrinks to painted content. It stops short of explaining in-place mutation vs. copy or undo implications for transforms specifically.

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 tight paragraphs, front-loaded with the layer/canvas mode split, with no filler sentences. The closing line about layers/filters/undo is slightly tangential but still earns its place as shared-behaviour context.

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 14-parameter destructive tool with no output schema and only 43% schema description coverage, the description covers mode semantics and a couple of behavioural traits but omits geometry parameters (anchor, x/y, width/height, factor, degrees) and the preview/background output controls. Adequate but visibly incomplete.

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 only 43%, so the description must carry more weight. It usefully maps the mode values to layer vs. canvas scopes and clarifies the layer index/active-layer concept, but parameters such as x, y, anchor, factor, degrees, width/height, preview and background receive no meaning from the description. Baseline 3 given partial compensation.

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?

The description states a specific verb and resource and then splits the operations into two scopes: 'scale | rotate | flip | translate on one layer' versus 'crop | resize | trim on the whole canvas.' This lets an agent distinguish it from siblings like paint_rect or paint_filter without opening the schema.

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 gives a prerequisite ('Target the canvas by name (created with paint_canvas)') and notes that layers/filters/undo behave consistently across drawing tools, which implies usage context. However it never states when to choose paint_transform over alternatives (e.g. paint_ops or paint_canvas) or any when-not conditions, leaving routing to inference.

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