Skip to main content
Glama

Set strokes

figma_set_strokes
Idempotent

Set or remove Figma node outlines/borders with solid colors, gradients, weight, alignment, dashes, joins, caps, and per-side widths.

Instructions

Set the outline (stroke) of nodes: exactly one of a solid color, a gradient (as in figma_set_fills), or remove: true to take it off; plus weight, alignment, dashes, line ends (cap) and corners (join). sides sets per-side weights on frames, rectangles, components and instances: a side left out is 0 — so { sides: { bottom: 1 } } is a bottom border — unless weight is given, which then fills it. This is the border — for the inside colour use figma_set_fills. Returns per-item results: { updated, items: [{ id, ok, error? }] } — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoEnd decoration of open paths and lines, as in figma_create_line.
joinNoHow corners of the path are joined.
alignNo
colorNoStroke colour, #rgb / #rrggbb / #rrggbbaa.
sidesNoPer-side weights in px — a bottom border, a table-row divider, an input underline.
removeNoRemove every stroke instead; give nothing else with it.
weightNoStroke weight in px.
nodeIdsYesNodes to change.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
gradientNoA gradient stroke instead of `color`.
dashPatternNoDash and gap lengths in px, e.g. [4, 2].
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already declaring non-readOnly, non-destructive and idempotent, the description still adds real context: per-item return shape ('{ updated, items: [{ id, ok, error? }] }') and the partial-failure guarantee that one node failing does not fail the call. It also discloses platform support ('Editors: Design; unverified: FigJam, Slides'), which the annotations do not.

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?

Three dense sentences that lead with the core action and the mutual-exclusion rule, then sides semantics, then the sibling pointer and return contract. Slightly packed but every clause carries information; nothing is redundant with the schema.

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 12-parameter tool with nested objects and no output schema, the description supplies the return format, the partial-failure behaviour, the exclusivity rule and platform caveats. Remaining gaps (auth/permission requirements, whether omitted stroke properties are preserved or reset) are minor but real.

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 92% so the baseline is 3, but the description adds semantics the schema does not encode: the exactly-one-of constraint across color/gradient/remove, and the 'sides' rule that a side left out is 0 while a supplied 'weight' fills the gaps. Those are non-obvious behaviours that materially change invocation.

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?

States a specific verb and resource ('Set the outline (stroke) of nodes') and immediately distinguishes itself from the sibling that handles the other half of the paint model: 'for the inside colour use figma_set_fills'. An agent can route between the two without opening either 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?

Names the alternative tool (figma_set_fills) and the condition that selects it, and clarifies that 'remove: true' takes the stroke off entirely. It does not state exclusions or prerequisites (e.g. permission needs), so it falls short of full when/when-not guidance.

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

Deploy Server

Other Tools