Set strokes
figma_set_strokesSet 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
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | End decoration of open paths and lines, as in figma_create_line. | |
| join | No | How corners of the path are joined. | |
| align | No | ||
| color | No | Stroke colour, #rgb / #rrggbb / #rrggbbaa. | |
| sides | No | Per-side weights in px — a bottom border, a table-row divider, an input underline. | |
| remove | No | Remove every stroke instead; give nothing else with it. | |
| weight | No | Stroke weight in px. | |
| nodeIds | Yes | Nodes to change. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| gradient | No | A gradient stroke instead of `color`. | |
| dashPattern | No | Dash and gap lengths in px, e.g. [4, 2]. | |
| idempotencyKey | No | Caller-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. |