Skip to main content
Glama
ACoci86

graphite-art-mcp

by ACoci86

Graphite: set fill, stroke or opacity of a layer

graphite_set_style
Idempotent

Change a vector layer's fill, stroke, width, or opacity. Only specified fields update; null removes a fill or stroke.

Instructions

Change the solid fill colour, stroke colour and width, and/or opacity of an existing layer. Only the fields given are changed; null removes a fill or stroke. Each change is one undo step. Fails with LAYER_NOT_FOUND if the id is not in the active document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fillNoHex colour #rrggbb or #rrggbbaa, or null for none.
strokeNoStroke colour, or null to remove the stroke colour.
opacityNoLayer opacity from 0 (transparent) to 1 (opaque).
layer_idYeslayer_id as returned by graphite_insert_svg or listed by graphite_get_document.
stroke_widthNoStroke width in document pixels (default 1 when a stroke colour is set).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
changedYes
layer_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (idempotent, non-destructive, not read-only), so the bar is lower, and the description still adds real behavioral detail: partial application ('Only the fields given are changed'), null-as-removal semantics, the one-undo-step per change guarantee, and the specific error code on a missing layer. Only return-shape detail is absent, which the output schema covers.

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?

Three short sentences with no filler, and the primary effect is front-loaded before the partial-update, undo and error clauses. Every sentence carries distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with full schema coverage, an output schema, and annotations declaring its safety profile, the description supplies the remaining operational facts an agent needs: scope of allowed targets, partial-update semantics, undo cost, and error behaviour.

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 100%, so all five parameters (including colour format, opacity range and stroke width) are already documented in the schema. The description only restates the null-removal behaviour and adds no format or default detail beyond what the schema provides.

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?

Names a specific verb and resource ('Change the solid fill colour, stroke colour and width, and/or opacity of an existing layer'), which cleanly separates it from siblings like graphite_transform_layer, graphite_rename_layer and graphite_delete_layer. The agent knows exactly which properties this tool mutates.

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?

Establishes that the target must be an existing layer in the active document and reports the LAYER_NOT_FOUND failure mode, giving clear context for when the call is appropriate. It does not, however, explicitly contrast itself with transform_layer/rename_layer or state prerequisites such as a selected document.

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