Skip to main content
Glama

Paint: canvas lifecycle

paint_canvas
Idempotent

Create, open, save, close, and inspect layered paint canvases before drawing. List files and check canvas size, layers, undo history, and pixel stats.

Instructions

Create, list, inspect, open, save or close canvases.

Actions: create {name, width, height, background} new canvas; background is a colour or null for transparent. Layers start as ["background"? , "layer N"]. info {name} size, layers, active index, undo depth, pixel statistics list {} every open canvas open {path} load a .paint / png / jpg / bmp file from the paint root save {name, path?} write the layered .paint document close {name} drop it from memory (files stay on disk) files {} what is on disk in the paint root history {name} undo/redo stack labels

A canvas must be created (or opened) before any drawing tool can be used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoFile path for open/save, relative to the paint root unless allowed
widthNoCanvas width in pixels (create)
actionYes
canvasNoCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
heightNoCanvas height in pixels (create)
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
backgroundNoFill colour for the bottom layer, or null for transparent

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the safety profile is partly covered. The description adds real behavioral context beyond that: close only drops the canvas from memory while 'files stay on disk', save writes the layered .paint document, open reads from the paint root, and create's layer initialization is described. It stops short of error/failure behavior or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence states the scope, then a compact action table carries all detail with no filler. The most important constraint (canvas must exist first) is placed last as a deliberate caveat, and every line earns its place.

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?

For a 7-parameter, 8-action tool with no output schema and 86% schema coverage, the description covers all actions, prerequisites, and persistence semantics. Minor gaps remain around return contents for info/history and error conditions, but nothing critical to correct invocation is missing.

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 86%, so the baseline is 3, but the description adds genuine value by mapping which parameters apply to which action (create {name, width, height, background}, open {path}, save {name, path?}) and clarifying semantics such as background=null for transparent and the initial layer stack. This goes beyond the per-field schema text.

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 names the exact resource (canvas) and enumerates eight concrete lifecycle verbs (create, info, list, open, save, close, files, history), making it immediately distinguishable from the drawing siblings like paint_line or paint_fill. An agent can tell this is the lifecycle/administration tool 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action is annotated with its purpose and required parameters, and the closing sentence gives the key prerequisite: 'A canvas must be created (or opened) before any drawing tool can be used.' That is strong routing guidance, but there are no explicit exclusions or pointers to which sibling handles subsequent operations (e.g. use paint_export instead of save for raster output).

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