Skip to main content
Glama
Figma Canvas MCP

Figma Canvas MCP

by AmroJSawan

figma_get_library_components

Discover published components from a shared design system library by file URL or key, then browse component sets and variants for instantiation in the current file.

Instructions

Discover published components from a shared/team library file.

USE THIS when you need to use components from a published design system library (a different file than the one currently open). This bridges the gap between library discovery and instantiation.

WORKFLOW:

  1. Call this tool with the library file's URL or file key

  2. Browse the returned components — results include COMPONENT_SET (with variants array) and standalone COMPONENT types

  3. Use figma_instantiate_component with a VARIANT key (from the variants array inside a COMPONENT_SET result, NOT the component set key itself)

SEARCH NOTE: The query filter matches both component names AND descriptions. If you get unexpected results (e.g., "Accordion" when searching "Button"), verify the result name matches what you need — it may have matched on a description mention.

MULTI-FILE TIP: If you need to find a specific component and REST API search returns too many results, you can switch to the library file via figma_navigate, use figma_execute to find the exact component and its variant key, then switch back.

NOTE: Requires FIGMA_ACCESS_TOKEN to be set (uses the Figma REST API to read the library file).

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_get_library_components"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results to return (default: 25, max: 100)
queryNoSearch query to filter components by name (e.g., 'Button', 'Card'). Leave empty to get all components.
offsetNoOffset for pagination
libraryFileKeyNoThe file key of the library file (e.g., 'abc123'). Either this or libraryFileUrl is required.
libraryFileUrlNoThe URL of the library file (e.g., https://www.figma.com/design/abc123/My-Design-System). Either this or libraryFileKey is required.
includeVariantsNoInclude individual variant components (default: false, only returns component sets)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.17.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses the FIGMA_ACCESS_TOKEN requirement, that the Figma REST API is used to read the library file, that the query matches names AND descriptions (a real behavioral quirk that explains surprising results), and what shapes come back (COMPONENT_SET with a variants array vs standalone COMPONENT). It omits error/failure behavior and rate-limit or permission constraints, which keeps it off a 5.

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 the one-line purpose and the USE THIS condition before any workflow detail, and each bolded section addresses a distinct question (workflow, search noise, fallback strategy, auth). The MULTI-FILE TIP is the longest and least essential block, adding some bulk, but nothing is pure 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?

For a six-parameter, annotation-free tool with no output schema, the description covers the missing pieces an agent needs: what the returned component types look like, the auth prerequisite, the search-matching quirk, and the downstream instantiation path. The absence of any note on failure modes or empty-result behavior is a minor remaining gap.

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 baseline is 3, but the description adds meaning the schema does not: it clarifies that the query filter matches descriptions as well as names (the schema only says 'by name'), and it explains how the variants array in a COMPONENT_SET result relates to the key needed for instantiation. The limit/offset pagination pair is left to the schema, which is fine.

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?

The opening sentence gives a specific verb and resource ('Discover published components from a shared/team library file') and the USE THIS line scopes it to a library file different from the currently open one. It clearly separates this from file-scoped work, though it never names figma_search_components or figma_get_component_details, so the agent must infer which sibling is the non-library alternative.

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 states exactly when to use the tool, gives a numbered workflow (fetch by URL/key, browse results, hand off to figma_instantiate_component with a VARIANT key), and explicitly warns against passing the component set key. It also names alternatives (figma_navigate plus figma_execute) for the case where REST search returns too many results, including when to switch back.

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