Skip to main content
Glama
figma-mcp-v2

figma-mcp-v2

by LukasAnda

Set text content

figma_set_text

Replaces a Figma text layer's characters and optionally updates text properties, with fonts loaded automatically. Use it to edit copy and styling by node ID without manual font setup.

Instructions

Replaces a text layer's characters (fonts are loaded automatically) and optionally its text properties.

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": {
      "node_id": "<node_id>",
      "text": "<text>"
    },
    "name": "figma_set_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoFigma link (or file key) of the file to edit. Needed only when the plugin is open in more than one file.
textYes
propsNoPlugin API properties to set, e.g. {"fills":"#FF5500","cornerRadius":8,"layoutMode":"VERTICAL","itemSpacing":12,"padding":[16,24],"primaryAxisAlignItems":"CENTER","layoutSizingHorizontal":"FILL","opacity":0.8,"effects":[{"type":"DROP_SHADOW","color":"#00000040","offset":{"x":0,"y":4},"radius":12,"spread":0,"visible":true,"blendMode":"NORMAL"}]}. Text: {"characters":"Hi","fontSize":16,"fontFamily":"Inter","fontStyle":"Bold","lineHeight":24}. Colors accept "#RRGGBB(AA)", "rgba()", or {r,g,b,a}.
node_idYesNode id, e.g. "12:345" (link form "12-345" also accepted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

The description adds one genuine behavioral fact beyond the annotations: fonts are loaded automatically, which explains why the call may take time. It also notes that characters are replaced, implying existing content is overwritten. It does not clarify error behavior on non-text nodes, whether repeated calls converge (relevant given idempotentHint=false), or what the response contains.

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?

A single front-loaded sentence that carries the core action and a useful parenthetical about font loading. Nothing is wasted, though the parenthetical is slightly compressed to the point of ambiguity about when loading occurs.

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

Completeness3/5

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

For a destructive-ish mutation on a nested-props tool with no output schema, the definition is functional but thin. The rich props schema covers the hard part, yet the description says nothing about required node type, failure modes, or whether replacing text preserves text properties not specified.

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

Parameters3/5

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

Schema coverage is 75% and the props parameter is already documented in depth with examples, formats, and accepted color notations. The description contributes only the framing that props are optional, and the text parameter itself remains undocumented in the schema with no extra explanation in the description. Baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource: it replaces a text layer's characters and optionally its text properties. An agent can tell this is the text-mutation tool rather than a create or style tool. However, it does not name or contrast any sibling such as figma_create_node or figma_apply_style.

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

Usage Guidelines3/5

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

Usage is only implied: use it when you want to change existing text content. There is no explicit when-to-use, no prerequisites (the node must already be a text layer), and no mention of alternatives for creating new text nodes or setting non-text properties.

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