Skip to main content
Glama
shaxaydev

Figma Local Bridge

by shaxaydev

figma_create_nodes

Creates editable Figma layers from a JSON node array, supporting frames, shapes, text, SVG, components, images, and auto-layout with rollback on failure.

Instructions

Create editable layers from a JSON array (max 500 nodes). Each node: type FRAME|RECTANGLE|ELLIPSE|TEXT|SVG|COMPONENT|INSTANCE; optional key for returned ID map; name,x,y,width,height,fill/stroke (#RRGGBB or transparent),strokeWeight,opacity,radius,clipsContent. Frames/components: layout NONE|HORIZONTAL|VERTICAL,gap,padding or paddingTop/Bottom/Left/Right,primaryAlign MIN|CENTER|MAX|SPACE_BETWEEN,counterAlign MIN|CENTER|MAX,children. Sizing: horizontalSizing/verticalSizing FIXED|HUG|FILL, with FILL only inside auto-layout and HUG only text/auto-layout. Text: text,fontFamily,fontStyle,fontSize,lineHeight,letterSpacing,textAlign LEFT|CENTER|RIGHT; explicit width wraps text. SVG requires svg source. INSTANCE requires local componentId. Images: imageBase64 PNG/JPEG bytes. Nodes are parented before sizing. Entire creation is rolled back if it fails. Use fonts from figma_fonts; position new roots clear of existing content.

Input Schema

NameRequiredDescriptionDefault
pageIdNoPage ID to select before running.
parentIdNo
nodesJsonYes
targetDocumentIdYesdocumentId returned by figma_document; protects against editing a different file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses important behavior: the entire creation is rolled back if it fails, nodes are parented before sizing, and there is a hard cap of 500 nodes. It also states validation rules like INSTANCE requiring a local componentId and SVG requiring an svg source.

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?

The content is front-loaded and every sentence carries technical specification rather than filler. However, it is a dense run-on paragraph with semicolon-separated field lists, so structure and readability could be improved.

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 a complex creation tool with no output schema and only partial schema descriptions, the definition covers the critical nodesJson contract, atomic rollback, limits, fonts, and positioning. It still leaves parentId semantics and some return-value detail implicit.

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 50%, but the description compensates heavily by documenting the nodesJson format in detail, including node types, styling, layout, sizing, text, SVG, and image fields. The main gap is parentId, which is undocumented in both the schema and description.

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 a specific verb and resource: 'Create editable layers from a JSON array (max 500 nodes).' It clearly distinguishes creation from sibling operations like figma_update_nodes and figma_delete_nodes by describing bulk node construction from JSON.

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?

It gives practical usage constraints: max 500 nodes, use fonts from figma_fonts, position new roots clear of existing content, FILL only inside auto-layout, and HUG only for text/auto-layout. It does not explicitly say when to choose this tool over figma_update_nodes, which keeps it from a 5.

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