set_stroke
Set stroke color, weight, alignment, and dash patterns on Figma nodes, including per-side border weights; pass color 'none' to remove strokes and update only specified options.
Instructions
Set stroke color / weight / alignment / dashes on nodes. color 'none' removes strokes. sides sets per-side weights (frames, components, instances, rectangles), e.g. {bottom: 1, top: 0, left: 0, right: 0} for a bottom border. Only the options you pass are changed. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeIds": "<nodeIds>"
},
"name": "set_stroke"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | strokeCap (lines/vectors) | |
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| join | No | ||
| align | No | ||
| color | No | Hex #RRGGBB / #RRGGBBAA, or 'none' to remove strokes | |
| sides | No | Per-side stroke weights | |
| weight | No | ||
| nodeIds | Yes | Figma node ids, e.g. ['12:34'] | |
| dashPattern | No | e.g. [4, 4] for dashed; [] for solid |