Style part of a text
figma_set_text_rangeStyle part of a Figma text node by matching a word or using start/end offsets, then apply fonts, colors, links, lists, and variables.
Instructions
Style part of one text node (or a sticky's, shape's or connector's text) — a bold word, a coloured price, an underlined link, a bulleted paragraph. Pick the part with match (every occurrence, or the nth with occurrence) or with start/end character offsets. Paragraph spacing, paragraph indent, list and its indent level widen to the whole paragraphs the part touches. To tie the part to the design system: textStyle and fillStyle (a local style's id or exact name), colorVariable (a COLOR variable), and variables per text field. One colour source per call: color, fillStyle or colorVariable. link takes a URL, or "node:" to link to a layer in this file. Everything is checked before the text changes. For whole-node properties (alignment, resizing, truncation) use figma_set_text_properties. Editors: Design; unverified: FigJam, Slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| case | No | ||
| link | No | A URL, or "node:<id>" for a layer in this file. | |
| list | No | Numbered or bulleted paragraphs; none removes the list. | |
| color | No | ||
| match | No | The text to style, e.g. "Pro". | |
| start | No | ||
| indent | No | List level of the lines, 0–5 (1 = a top-level item); with `list` for nested bullets. | |
| nodeId | Yes | ||
| weight | No | Font weight as a number ("600") or a Figma style name ("Semi Bold" — Inter uses spaces, not "SemiBold"). | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| fontSize | No | ||
| fillStyle | No | A paint style id or exact name for the text colour. | |
| textStyle | No | A text style id ("S:…") or exact name, e.g. "Body/Strong". | |
| variables | No | Bind fields of the range to variables, e.g. { "fontSize": "type/body/size" }: FLOAT for sizes and spacing, STRING for family and style, either for weight. | |
| decoration | No | ||
| fontFamily | No | A family available in this Figma (figma_suggest_fonts lists ranked ones). | |
| lineHeight | No | "auto", px ("24"), or percent ("150%"). | |
| occurrence | No | Only the nth match. Default: all. | |
| colorVariable | No | A COLOR variable name or id, e.g. "color/text/link". | |
| letterSpacing | No | px ("0.5") or percent ("-1%"). | |
| 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. | |
| paragraphIndent | No | px the first line of each paragraph is offset from the left. | |
| paragraphSpacing | No | Vertical px between paragraphs. |