get_styled_text_segments
Extract text segments with specific styling from a Figma text node based on properties like font size, weight, or decoration. Retrieve structured JSON data for precise style analysis.
Instructions
Get text segments with specific styling in a text node.
Returns:
content: Array of objects. Each object contains a type: "text" and a text field with the styled text segments as JSON.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
nodeId | Yes | The unique Figma text node ID to analyze. Must be a string in the format '123:456'. | |
property | Yes | The style property to analyze segments by. Must be one of the allowed style property names. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"nodeId": {
"description": "The unique Figma text node ID to analyze. Must be a string in the format '123:456'.",
"type": "string"
},
"property": {
"description": "The style property to analyze segments by. Must be one of the allowed style property names.",
"enum": [
"fillStyleId",
"fontName",
"fontSize",
"textCase",
"textDecoration",
"textStyleId",
"fills",
"letterSpacing",
"lineHeight",
"fontWeight"
],
"type": "string"
}
},
"required": [
"nodeId",
"property"
],
"type": "object"
}