Skip to main content
Glama

Import library assets

figma_import_library_assets
Idempotent

Bring published library assets into this file by key — components, component sets, styles, variables — and get the local ids every other tool takes: figma_create_instance / figma_swap_component componentId, figma_apply_style_to_node…

Instructions

Bring published library assets into this file by key — components, component sets, styles, variables — and get the local ids every other tool takes: figma_create_instance / figma_swap_component componentId, figma_apply_style_to_node styleId, figma_bind_variable_to_node variableId. Keys come off an existing screen (figma_get_design_context, figma_get_component) or from the library file opened as another session. Only published assets import; each one that does not carries Figma's reason: items: [{ key, kind, ok, id?, name?, type?, error? }]. To place a single library component, figma_create_instance componentKey imports it itself. Editors: Design; unverified: FigJam, Slides.

Input Schema

NameRequiredDescriptionDefault
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.
assetsYes
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
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.5/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, idempotent, non-destructive operation, so the description need not restate those safety traits. It adds useful behavior beyond annotations: per-item failure reasons in the returned items array and editor support (Design; unverified FigJam/Slides). It stops short of explaining transactionality or permission details beyond editor availability.

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 purpose and key sources are front-loaded, and every clause carries practical information about importing, returned ids, failures, alternatives, or editor support. The opening sentence is fairly dense with sibling tool names and id mappings, so it is slightly harder to scan than ideal, but there is no filler.

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?

With no output schema, the description supplies the important return shape: items with key, kind, ok, id, name, type, and error. Combined with the schema's parameter descriptions and editor notes, it is close to complete for this mutation tool, though it does not spell out whether imports are atomic or how partial successes should be handled beyond the per-item shape.

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 high at 75%, and the schema itself richly documents force, session, and idempotencyKey. The description adds meaningful semantics for the assets parameter by explaining that keys come from existing screens or a library session and that the returned local ids feed componentId, styleId, and variableId in sibling tools.

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 uses a specific verb and resource ('Bring published library assets into this file by key') and enumerates the asset kinds handled: components, component sets, styles, and variables. It also distinguishes the single-component path from figma_create_instance, so an agent can tell what this tool is for without opening the schema.

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?

It explicitly says where keys come from (figma_get_design_context, figma_get_component, or a library file opened as another session) and states that only published assets import. It also names the alternative for placing a single library component via figma_create_instance 'componentKey' and gives editor applicability.

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