set_text_content
Updates text content in Figma nodes using specified node IDs and new text values. Supports single or multiple node updates for efficient text manipulation in real-time design workflows.
Instructions
Sets the text content of one or more text nodes in Figma. Returns:
content: Array of objects. Each object contains a type: "text" and a text field with the update result.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
nodeId | No | The unique Figma text node ID to update. Must be a string in the format '123:456' or a complex instance ID like 'I422:10713;1082:2236'. | |
text | No | The new text content to set for the node. Must be a non-empty string. Maximum length 10,000 characters. | |
texts | No | Array of objects specifying nodeId and text for each child text node to update. Must contain 1 to 100 items. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"nodeId": {
"description": "The unique Figma text node ID to update. Must be a string in the format '123:456' or a complex instance ID like 'I422:10713;1082:2236'.",
"type": "string"
},
"text": {
"description": "The new text content to set for the node. Must be a non-empty string. Maximum length 10,000 characters.",
"maxLength": 10000,
"minLength": 1,
"type": "string"
},
"texts": {
"description": "Array of objects specifying nodeId and text for each child text node to update. Must contain 1 to 100 items.",
"items": {
"additionalProperties": false,
"properties": {
"nodeId": {
"description": "The unique Figma child text node ID to update. Must be a string in the format '123:456' or a complex instance ID like 'I422:10713;1082:2236'.",
"type": "string"
},
"text": {
"description": "The new text content to set for the child node. Must be a non-empty string. Maximum length 10,000 characters.",
"maxLength": 10000,
"minLength": 1,
"type": "string"
}
},
"required": [
"nodeId",
"text"
],
"type": "object"
},
"maxItems": 100,
"minItems": 1,
"type": "array"
}
},
"type": "object"
}