Skip to main content
Glama
yhoyoex

OpenCode Figma MCP

by yhoyoex

create_text_style

Creates a local Figma text style (typography token) with configurable font, size, spacing, and case. Use slash names to group styles and get the style ID for applying it.

Instructions

Create a local text style (typography token). Use slashes in the name to group styles, e.g. 'Heading/H1'. Returns the style id for apply_text_style.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStyle name, e.g. 'Body/Medium 14'
fontSizeNoFont size in pixels
textCaseNoText case
fontStyleNoFont style name as shown in Figma, e.g. "Regular", "Medium", "Semi Bold", "Bold". Takes precedence over fontWeight
fontFamilyNoFont family (default: Inter, or the style's current family)
fontWeightNoFont weight (100-900), mapped to a font style name when fontStyle is not given
lineHeightNoLine height: number (pixels), "AUTO", or { unit: "PIXELS" | "PERCENT", value }
descriptionNoOptional style description
letterSpacingNoLetter spacing: number (pixels) or { unit: "PIXELS" | "PERCENT", value }
textDecorationNoText decoration
paragraphSpacingNoParagraph spacing in pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that the style is 'local' (file-scoped) and that it returns a style id for apply_text_style, which is genuinely beyond the schema. It omits edit-permission requirements, whether creation mutates current document state, duplicate-name behavior, and error conditions.

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 short sentences with zero padding; the core action is front-loaded, followed by the naming convention and the return value. Every sentence earns its place.

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?

For an 11-parameter create tool with no annotations and no output schema, the description does well to state the return value ('style id') and the naming convention. It still leaves behavioral gaps around permissions, mutation scope, and failure modes that an agent creating document assets would benefit from knowing.

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, but the description adds a real naming convention ('use slashes to group styles, e.g. Heading/H1') that the schema does not codify as a grouping rule. Other parameters are left entirely to the schema, which is acceptable given full coverage.

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 ('Create a local text style (typography token)'), which is unambiguous and distinct from update_text_style or create_effect_style. It does not explicitly name a sibling to contrast against, so it falls short of the top mark.

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?

The mention of 'apply_text_style' implies this is the precursor to applying that style, giving implied usage context. However, there is no explicit when-to-use/when-not-to-use guidance, no mention of update_text_style for modifying existing styles, and no prerequisites stated.

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