set_text_style
Update an existing text node's font, size, alignment, line height, letter spacing, or sizing, including text inside an instance, to adjust typography in Figma designs.
Instructions
Change an existing text node's font, size, alignment, line height, letter spacing or sizing, including text inside an instance
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": {
"nodeId": "<nodeId>"
},
"name": "set_text_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Fixed width: the text wraps and its height follows | |
| nodeId | Yes | The text node's ID | |
| fontSize | No | Font size | |
| fontStyle | No | The family's own style name, e.g. "Regular", "Semibold", "Bold" for SF Pro | |
| fontFamily | No | Any font installed for Figma, e.g. "SF Pro", "SF Pro Rounded", "New York" | |
| lineHeight | No | Line height in pixels | |
| letterSpacing | No | Letter spacing in pixels | |
| textAutoResize | No | ||
| textAlignVertical | No | ||
| textAlignHorizontal | No |