Overview
Theset_multiple_text_contents tool updates multiple text nodes in a single operation. It’s optimized for bulk text updates with automatic chunking, progress tracking, and error handling for individual failures.
Parameters
string
required
The ID of the parent node containing the text nodes to replace
array
required
Array of objects specifying which text nodes to update and their new contentEach object must contain:
nodeId(string, required) - The ID of the text node to updatetext(string, required) - The new text content
Response
Returns an object containing:success(boolean) - Overall operation successnodeId(string) - Parent node IDreplacementsApplied(number) - Number of successful updatesreplacementsFailed(number) - Number of failed updatestotalReplacements(number) - Total number of replacements attemptedcompletedInChunks(number) - Number of batches processedresults(array) - Detailed results for each text node:success(boolean) - Whether this specific update succeedednodeId(string) - The text node IDerror(string, optional) - Error message if update failedoriginalText(string, optional) - Original text contenttranslatedText(string, optional) - New text content
Batch Processing
The tool automatically processes text updates in batches:- Batch Size: Processes 5 nodes at a time
- Progress Updates: Real-time updates after each batch
- Partial Success: Continues processing even if some nodes fail
- Error Isolation: Failures in one node don’t affect others
Progress Tracking
During processing, you’ll receive progress updates showing:- Current batch being processed (e.g., “Processing batch 3 of 10”)
- Number of nodes processed so far
- Percentage complete
- Any errors encountered
Example
Use Cases
Localization/Translation
Translate all text in a design to a different language.Content Population
Populate a design template with real data from an API.Table Data Updates
Update multiple rows in a table design.A/B Testing Variants
Quickly create text variations for testing.Performance Considerations
Batch Size
The default batch size of 5 nodes balances performance and responsiveness:- Smaller batches (1-3): More progress updates, slower overall
- Default batches (5): Good balance for most use cases
- Larger batches would be faster but with less granular progress
Processing Time
Expect approximately:- 1-10 nodes: < 1 second
- 10-50 nodes: 2-5 seconds
- 50-200 nodes: 10-20 seconds
- 200+ nodes: 30+ seconds with continuous progress updates
Font Loading
The first update to a node may be slower if Figma needs to load the font. Subsequent updates with the same font are faster.Error Handling
The tool is designed to be resilient:Common Errors
- “Node not found”: The specified nodeId doesn’t exist
- “Not a text node”: The node is a different type (frame, rectangle, etc.)
- “Font loading failed”: The required font isn’t available
- “No text provided”: Empty text array passed
Best Practices
1. Validate Before Updating
2. Handle Partial Failures
3. Chunk Large Updates
For 500+ nodes, consider splitting into multiple calls:4. Verify Critical Updates
Workflow Example: Content Localization
Related Tools
- scan_text_nodes - Find all text nodes before updating
- set_text_content - Update a single text node
- clone_node - Clone designs before making changes
- export_node_as_image - Export after updates for verification