Create line
figma_create_lineDraw a straight line in Figma for dividers, connectors, arrows, underlines, or decorative strokes. Set length, angle, and end caps to place it precisely.
Instructions
A straight line: dividers, connectors, arrows, underlines, decorative strokes. length in px from (x, y), turned by angle degrees (0 = to the right, 90 = up). cap decorates both ends: arrow, arrow-filled, triangle, circle, diamond, round, square. For a divider inside an auto-layout, a 1 px figma_create_rectangle with sizing: { horizontal: "fill" } stretches with the column; a line keeps its length. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| cap | No | ||
| name | No | ||
| angle | No | Degrees, default 0. | |
| color | No | Default #000000. | |
| length | Yes | ||
| weight | No | Stroke weight in px, default 1. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| parentId | No | ||
| dashPattern | No | Dash and gap lengths, e.g. [4, 4]. | |
| 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. |