Skip to main content
Glama
Figma Canvas MCP

Figma Canvas MCP

by AmroJSawan

figma_instantiate_component

Create a component instance in Figma from a local or published library key, then set variants, position, parent, and overrides for design work.

Instructions

Create an instance of a component from the design system — works with BOTH local and published library components.

For local components: Pass BOTH componentKey AND nodeId together. Most local/unpublished components require nodeId. For library components: Pass just the componentKey from figma_get_library_components or figma_search_components (with libraryFileKey). The component will be imported from the published library automatically.

CRITICAL: Use VARIANT keys, not COMPONENT_SET keys! When importing from a published library, use the key of a specific variant (type: "COMPONENT"), NOT the parent component set key (type: "COMPONENT_SET"). Component set keys will fail with importComponentByKeyAsync. In figma_get_library_components results, look inside the "variants" array for individual variant keys.

Font loading: Library components may use fonts not loaded in the current file. If instantiation fails with a font error, load the required fonts first via figma_execute before retrying (e.g., await figma.loadFontAsync({ family: "Geist", style: "Regular" })).

IMPORTANT: Always re-search before instantiating! NodeIds are session-specific and may be stale from previous conversations. ALWAYS search for components at the start of each design session to get current, valid identifiers.

VISUAL VALIDATION WORKFLOW: After instantiating components, use figma_take_screenshot to verify the result looks correct. Check placement, sizing, and visual balance.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "figma_instantiate_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdNoThe node ID from search results. ALWAYS pass this alongside componentKey - most local components need it.
variantNoVariant properties to set (e.g., { Type: 'Simple', State: 'Active' })
parentIdNoParent node ID to append the instance to
positionNoPosition on canvas (default: 0, 0)
overridesNoProperty overrides (e.g., { 'Button Label': 'Click Me' })
componentKeyNoThe component key from search results. Pass this WITH nodeId for automatic fallback.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.17.3

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses failure modes (COMPONENT_SET keys throw in importComponentByKeyAsync, font-loading errors, stale nodeIds), a recovery path via figma_execute, and a post-hoc validation step via figma_take_screenshot. It stops short of saying what the call returns (e.g., the new instance's node id) or whether repeated calls duplicate nodes, which are the remaining behavioral gaps for a mutation.

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?

Bold section headers with front-loaded critical warnings (variant keys, local vs library) make a long description scannable, and the most dangerous failure mode is called out early. It is verbose for a single tool, but each block addresses a distinct failure the agent would otherwise hit.

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 six-parameter mutation with nested objects, no annotations, and no output schema, the description covers sourcing, identifier validity, error recovery, and verification. What it omits—the return payload and how overrides behave when a property does not exist on the instance—are modest but real gaps for chaining calls.

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 a 3 is the floor, but the description genuinely adds meaning the schema cannot: the conditional relationship between componentKey and nodeId per component source, and the critical distinction that 'variant' must reference individual COMPONENT variant keys rather than the parent COMPONENT_SET key. parentId, position, and overrides are left to 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?

States a specific verb and resource ('Create an instance of a component from the design system') and immediately scopes it to both local and published library components, which is the key distinguishing axis. It also names the prerequisite siblings (figma_get_library_components, figma_search_components) so an agent can tell this apart from lookup tools.

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 branches usage by case: pass componentKey+nodeId for local components, componentKey alone for library components. It also states a when-not rule (do not use COMPONENT_SET keys) and a procedural prerequisite (always re-search because nodeIds are session-specific and can be stale), which is exactly the guidance needed before invocation.

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