Skip to main content
Glama

Apply style

figma_apply_style_to_node
Idempotent

Apply a local style (paint, text, effect or grid) by id or by name — the node then follows the style. Give type when a name is shared across kinds, or to apply a paint style as the stroke (default: fill).

Instructions

Apply a local style (paint, text, effect or grid) by id or by name — the node then follows the style. Give type when a name is shared across kinds, or to apply a paint style as the stroke (default: fill). figma_get_styles lists local styles; a style from a library (not listed there) is applied by the id that figma_get_design_context returns in stylesUsed. For a raw colour use figma_set_fills. Returns per-item results: { updated, items: [{ id, ok, error? }] } — one node failing does not fail the call. Editors: Design; unverified: FigJam, Slides.

Input Schema

NameRequiredDescriptionDefault
typeNo
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
nodeIdsYesNodes to change.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
styleIdNoA style id from figma_get_styles.
styleNameNoOr its exact name, e.g. "Brand/Primary".
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare non-read-only, idempotent, non-destructive, but the description adds what the annotations cannot: per-item partial-failure semantics (`{ updated, items: [{ id, ok, error? }] }`, one node failing does not fail the call) and platform support scope (Design verified; FigJam/Slides unverified). This is exactly the extra context the bar asks for.

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?

Front-loaded with purpose, then routing, then return shape, then platform scope — no filler sentences. It is dense and semicolon-packed for a 7-parameter tool, which slightly slows parsing but every clause carries information.

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?

No output schema exists, yet the description spells out the return shape and partial-failure behaviour, and it covers platform reach and the id-vs-name sourcing. An agent has everything needed to call this mutation correctly without opening other tools.

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 already 86%, so the baseline is 3, but the description adds real meaning: the `type`-vs-name interaction, the default-to-fill behaviour of paint styles, and where a valid `styleId` originates for library styles. The STALE/`force` semantics live in the schema, so the description doesn't repeat them.

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?

States a specific verb (apply) and resource (local style: paint, text, effect, grid) plus the resulting behavior ('the node then follows the style'). It is also clearly distinguishable from sibling figma_set_fills, which it explicitly reserves for raw colour.

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?

Gives explicit routing rules: use styleName when convenient, supply `type` when a name is shared across kinds or to apply a paint style as a stroke (default fill), get local styles from figma_get_styles, and use the `id` from figma_get_design_context's `stylesUsed` for library styles. It names the alternative (figma_set_fills) and the condition that selects it.

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

Deploy Server

Other Tools