Skip to main content
Glama

create_text_style

Destructive

Create a local text style with customizable font family, size, weight, line height, decoration, and spacing. Apply the style to nodes to maintain typography consistency.

Instructions

Create a new local text style (typography preset). Returns the new style's ID. Apply it to nodes with apply_style_to_node. Use get_styles to list existing text styles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStyle name — use slash notation to organise into groups e.g. 'Heading/H1', 'Body/Regular'
fontSizeNoFont size in pixels (default 16)
fontStyleNoFont style variant e.g. 'Regular', 'Bold', 'Medium', 'SemiBold' (default Regular)
fontFamilyNoFont family name e.g. 'Inter', 'Roboto' (default Inter). Must be installed in Figma.
descriptionNoOptional human-readable description shown in the Figma style panel
lineHeightUnitNoLine height unit: PIXELS (default) or PERCENT
textDecorationNoText decoration: NONE (default), UNDERLINE, or STRIKETHROUGH
lineHeightValueNoLine height value (unit set by lineHeightUnit)
letterSpacingUnitNoLetter spacing unit: PIXELS (default) or PERCENT
letterSpacingValueNoLetter spacing value (unit set by letterSpacingUnit)
Behavior4/5

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

The description discloses that the tool returns the new style's ID, which is not in annotations. It implies creation (consistent with destructiveHint=true) and mentions the style is local. No contradictions with 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?

Three concise sentences front-load the main action and return value, with no superfluous 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?

Given the schema covers all parameters and the description explains the return value and related tools, the definition is fairly complete. It could mention error handling (e.g., duplicate names) but is adequate for a creation tool.

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 description coverage is 100%, so the baseline is 3. The description adds no new information beyond what is already in the schema, such as the slash notation for grouping in the name parameter, which is already documented in 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 clearly states the tool creates a new local text style (typography preset) and returns its ID. It distinguishes from sibling style creation tools by specifying 'typography preset' and mentions related tools like apply_style_to_node and get_styles.

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?

The description explicitly says to use apply_style_to_node to apply the style and get_styles to list existing styles, providing clear context. It does not explicitly state when not to use, but the guidance is sufficient for an agent to decide.

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/vkhanhqui/figma-mcp-go'

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