Skip to main content
Glama

Set text

figma_set_text
Idempotent

Replace the content of a TEXT node — or, on a board, of a sticky, shape or connector label, or a code block's code (a table's cells: figma_edit_table).

Instructions

Replace the content of a TEXT node — or, on a board, of a sticky, shape or connector label, or a code block's code (a table's cells: figma_edit_table). The node's current font is loaded first, so this works on text this project did not create. If the node had more than one style (a bold word, a second font), Figma gives the new text the first character's style and the rest is lost — the result then carries flattened.runs with the old segments, so you can reapply them with figma_set_text_range. Editors: Design; unverified: FigJam, Slides.

Input Schema

NameRequiredDescriptionDefault
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
nodeIdYes
contentYes
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial context beyond the annotations: it discloses the destructive side effect (multi-style runs flattened to the first character's style), notes the mitigation (`flattened.runs` in the result for figma_set_text_range reapply), explains that fonts are loaded first so foreign text works, and flags editor support (Design verified; FigJam/Slides unverified). That is exactly the data-loss and environment risk an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then secondary targets and caveats. Dense but every clause carries information (targets, font loading, flattening, recovery path, editor support); the single long sentence with parentheticals is slightly harder to scan than it could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description steps up by describing the meaningful part of the return value (`flattened.runs`). Combined with the stale-write/idempotency behavior covered in the schema, an agent has enough to call this safely; only the full response shape and stale error handling in prose are missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60%, and the two bare required params (nodeId, content) have no schema description; the prose partially compensates by describing which node types are valid targets and what 'content' means in each case. force and idempotencyKey are already well documented in the schema, and the description adds the flattened-result semantics needed to use the output correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (replace content) and names the exact resource classes it accepts: TEXT nodes, board sticky/shape/connector labels, code blocks, plus a redirect for table cells. An agent can distinguish it from figma_create_text or figma_set_text_properties without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes table-cell edits to figma_edit_table and style re-application to figma_set_text_range, which is real alternative-routing. It does not address figma_find_replace_text or when to prefer creating new text over overwriting, so it stops short of a full when/when-not map.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools