Skip to main content
Glama

create_text_style

Create a reusable text style for consistent typography across Figma text nodes, with font, size, line height, and spacing options.

Instructions

Create a reusable local text style (a typography token) that can be applied to TEXT nodes with apply_style_to_node. The font is loaded before assignment. lineHeight unit is AUTO / PIXELS / PERCENT (AUTO omits value); letterSpacing unit is PIXELS / PERCENT. For one-off formatting of a single node use set_text_properties instead. Returns { ok, styleId, name }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStyle name, e.g. "Heading/H1"
fontNameNo
fontSizeNo
lineHeightNo
descriptionNo
letterSpacingNo
Behavior4/5

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

While annotations only provide readOnlyHint=false and destructiveHint=false, the description adds meaningful behavior: 'The font is loaded before assignment' and explains edge-case unit semantics (AUTO omits value). It stops short of describing potential failure modes or side effects, but the added context goes beyond annotations.

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 three sentences, front-loaded with the primary purpose, followed by key behavioral details and an explicit alternative. Every sentence serves a purpose, with no redundant or filler content.

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?

The description is remarkably complete given the tool's complexity: it covers creation, reusability, application method, font loading, unit specifics, the alternative for one-off use, and the return shape. Minor gaps exist around error conditions or naming uniqueness, but the core usage context is well-covered.

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 description coverage is only 17%, so the description must compensate. It does explain lineHeight and letterSpacing unit semantics, and the font loading behavior relates to fontName. However, it doesn't elaborate on fontSize, description, or the exact structure of fontName beyond what the schema offers, leaving some parameters without additional semantic depth.

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 reusable local text style (a typography token) for TEXT nodes, using a specific verb and resource. It distinguishes itself from sibling tools like set_text_properties and other create_style tools by specifying text typography and reuse.

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 provides an alternative: 'For one-off formatting of a single node use set_text_properties instead.' It also implies when to use this tool by mentioning that the style can be applied later via apply_style_to_node, making the usage context clear.

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