create_text_style
Creates a local text style with font family, style, size, line height, and letter spacing; optionally binds font properties to variables and rejects duplicate names.
Instructions
Create a local text style (family, style, size, line height as lineHeight {unit PIXELS|PERCENT|AUTO, value} or lineHeightPercent, and letter spacing %), with fontFamily, fontWeight and fontSize optionally bound to variables (IDs). Refuses a name that already exists.
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": {
"name": "<name>",
"fontFamily": "<fontFamily>",
"fontStyle": "<fontStyle>",
"fontSize": "<fontSize>"
},
"name": "create_text_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| fontSize | Yes | ||
| fontStyle | Yes | Figma font style, e.g. Medium | |
| fontFamily | Yes | ||
| lineHeight | No | Line height in pixels, percent or AUTO. Do not combine with lineHeightPercent. | |
| fontSizeVariable | No | FLOAT variable ID | |
| lineHeightPercent | No | ||
| fontFamilyVariable | No | STRING variable ID | |
| fontWeightVariable | No | FLOAT variable ID | |
| letterSpacingPercent | No |