Skip to main content
Glama

figma_create_text

Add a text node outside components with mandatory DS text style and color variable. Name nodes semantically (e.g., 'Page Title').

Instructions

Creates a standalone text node bound to a DS text style (textStyleId — accepts style name or key) and DS color variable (fillVariable) — both are mandatory when the DS has them. Use for text OUTSIDE components; text inside a component instance uses figma_component_text instead. Strips hardcoded line breaks (container width controls wrapping). Name nodes after their HTML role ("Page Title", "Card: Revenue Label"). Params: parentId + content required. Phase 2+.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSemantic name describing the HTML element role (e.g., "Page Title", "Card: Revenue Label", "Subtitle"). Never use generic names like "Text".
widthNoFixed width for the text node.
contentYesText content.
parentIdYesParent node ID.
fillStyleIdNoDS fill style key for text color (from figma_list_ds (kind: "fill_styles")). Preferred over fillVariable when DS has fill styles but no variables.
textStyleIdNoDS text style — accepts style name (e.g. "Text sm/Semibold") or style key. Names are resolved to keys automatically.
fillVariableNoDS variable path for text color.
fontSizeVariableNoDS variable path for font size (if no text style).
layoutPositioningNoSet to ABSOLUTE to overlay this text inside an auto-layout parent.
lineHeightVariableNoDS variable path for line height.
textAlignHorizontalNoText alignment.
layoutSizingHorizontalNoHorizontal sizing mode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changedv3.0.0
    • addedInput schema / properties / content
      Added value: +{
      +  "description": "Text content.",
      +  "type": "string"
      +}
    • removedInput schema / properties / fillHex
      Removed value: -{
      -  "description": "Fallback hex color.",
      -  "type": "string"
      -}
    • addedInput schema / properties / fillStyleId
      Added value: +{
      +  "description": "DS fill style key for text color (from figma_list_ds (kind: \"fill_styles\")). Preferred over fillVariable when DS has fill styles but no variables.",
      +  "type": "string"
      +}
    • changedInput schema / properties / fillVariable / description
      Previous value: -"Color token path, e.g. \"Colors/Text/text-primary\"."New value: +"DS variable path for text color."
    • removedInput schema / properties / fontSize
      Removed value: -{
      -  "description": "Fallback — prefer textStyleId.",
      -  "type": "number"
      -}
    • addedInput schema / properties / fontSizeVariable
      Added value: +{
      +  "description": "DS variable path for font size (if no text style).",
      +  "type": "string"
      +}
    • removedInput schema / properties / fontWeight
      Removed value: -{
      -  "description": "Fallback — prefer textStyleId.",
      -  "enum": [
      -    400,
      -    500,
      -    600,
      -    700
      -  ],
      -  "type": "number"
      -}
    • removedInput schema / properties / layoutAlign
      Removed value: -{
      -  "enum": [
      -    "MIN",
      -    "CENTER",
      -    "MAX",
      -    "STRETCH",
      -    "INHERIT"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / layoutGrow
      Removed value: -{
      -  "type": "number"
      -}
    • addedInput schema / properties / layoutPositioning
      Added value: +{
      +  "description": "Set to ABSOLUTE to overlay this text inside an auto-layout parent.",
      +  "enum": [
      +    "AUTO",
      +    "ABSOLUTE"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / layoutSizingHorizontal
      Added value: +{
      +  "description": "Horizontal sizing mode.",
      +  "enum": [
      +    "FIXED",
      +    "HUG",
      +    "FILL"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / lineHeight
      Removed value: -{
      -  "description": "Line height in px. Fallback — prefer textStyleId.",
      -  "type": "number"
      -}
    • addedInput schema / properties / lineHeightVariable
      Added value: +{
      +  "description": "DS variable path for line height.",
      +  "type": "string"
      +}
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Semantic name describing the HTML element role (e.g., \"Page Title\", \"Card: Revenue Label\", \"Subtitle\"). Never use generic names like \"Text\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / parentId
      Added value: +{
      +  "description": "Parent node ID.",
      +  "type": "string"
      +}
    • removedInput schema / properties / parentNodeId
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / text
      Removed value: -{
      -  "description": "Text content.",
      -  "type": "string"
      -}
    • addedInput schema / properties / textAlignHorizontal / description
      Added value: +"Text alignment."
    • changedInput schema / properties / textAlignHorizontal / enum
      Previous value: -[
      -  "LEFT",
      -  "CENTER",
      -  "RIGHT"
      -]New value: +[
      +  "LEFT",
      +  "CENTER",
      +  "RIGHT",
      +  "JUSTIFIED"
      +]
    • changedInput schema / properties / textStyleId / description
      Previous value: -"DS text style ID (e.g. \"S:abc123,7649:603\"). Use figma_list_text_styles to discover IDs."New value: +"DS text style — accepts style name (e.g. \"Text sm/Semibold\") or style key. Names are resolved to keys automatically."
    • changedInput schema / properties / width / description
      Previous value: -"Fixed width — text wraps at this width."New value: +"Fixed width for the text node."
    • removedInput schema / properties / x
      Removed value: -{
      -  "type": "number"
      -}
    • removedInput schema / properties / y
      Removed value: -{
      -  "type": "number"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "text"
      -]New value: +[
      +  "parentId",
      +  "content"
      +]
  2. First observedv1.4.0

TDQS

A4.5/5.0
Behavior4/5

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

The description discloses that it strips hardcoded line breaks (container width controls wrapping) and that nodes should be named after HTML roles. Annotations provide no behavioral info (all false), so the description adds these details. No contradictions.

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?

The description is concise (three sentences) and front-loaded with the core purpose. However, it mixes purpose, usage guidelines, and behavior in a single paragraph; a clearer structure could improve readability slightly.

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?

Given the complexity (12 parameters, no output schema), the description provides sufficient context about what the tool does and its constraints. It does not explain return values, but that is acceptable since no output schema exists.

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 100% with descriptions, but the description adds context beyond the schema, such as mandatory conditions for textStyleId and fillVariable, and the naming convention. This adds value for parameter understanding.

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?

The description clearly states it creates a standalone text node bound to a DS text style and color variable. It specifies the verb 'creates' and the resource 'text node', and distinguishes it from the sibling tool figma_component_text.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool ('Use for text OUTSIDE components') and when not to ('text inside a component instance uses figma_component_text instead'). Also notes that textStyleId and fillVariable are mandatory when the DS has them.

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