Skip to main content
Glama

set_text_range

Style character ranges within an existing Figma TEXT node to create inline rich text: bold, italic, links, colors, lists, and more.

Instructions

Style character ranges of an existing TEXT node — the write-side mirror of a read segment, for inline rich text (a link inside a sentence, a bold word, a coloured span, a bulleted list, a smaller /mo after a price). Each range gives start/end (char offsets into the node's characters) plus any subset of run properties: fontName / fontSize / fills / textDecoration / textCase / lineHeight / letterSpacing / hyperlink / listOptions / indentation, and design-system bindings textStyleId / fillStyleId / boundVariables. Ranges apply in order (a later range overrides an earlier one on overlap). Fonts are loaded automatically. Set the whole node first with create_text / set_text; use set_text_properties for node-level typography & overflow. Returns { ok, nodeId }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesTEXT node id whose ranges to style
rangesYesCharacter ranges + the run properties to apply to each
Behavior5/5

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

The description discloses that ranges apply in order with later overrides, and that fonts load automatically — beyond the annotations' simple readOnly/destructive flags. It also warns to set the whole node first, a key prerequisite.

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

Conciseness5/5

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

The description is front-loaded with the purpose and then packs every sentence with useful detail — examples, properties, ordering, font loading, prerequisites, and return value. No filler.

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

Completeness5/5

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

For a write tool with a complex nested parameter, the description covers the key preconditions and alternatives, and states the return shape since there is no output schema. It is sufficiently complete for correct selection and invocation.

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%, so the baseline is 3. The description adds that each range applies 'any subset of run properties' and clarifies the sequential override behavior, which enriches the ranges parameter semantics without fully duplicating the schema.

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 opens with 'Style character ranges of an existing TEXT node' — a specific verb and resource. It explicitly distinguishes from siblings by naming set_text and set_text_properties as alternatives, and gives concrete examples of inline rich 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?

It states 'Set the whole node first with create_text / set_text; use set_text_properties for node-level typography & overflow' — explicit when-to-use and alternatives. The phrase 'write-side mirror of a read segment' also frames when this tool is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server