figma_get_library_components
Discover published components and variants from a shared Figma library file so you can find design-system elements before instantiating them in another 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:
Call this tool with the library file's URL or file key
Browse the returned components — results include COMPONENT_SET (with variants array) and standalone COMPONENT types
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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return (default: 25, max: 100) | |
| query | No | Search query to filter components by name (e.g., 'Button', 'Card'). Leave empty to get all components. | |
| offset | No | Offset for pagination | |
| libraryFileKey | No | The file key of the library file (e.g., 'abc123'). Either this or libraryFileUrl is required. | |
| libraryFileUrl | No | The URL of the library file (e.g., https://www.figma.com/design/abc123/My-Design-System). Either this or libraryFileKey is required. | |
| includeVariants | No | Include individual variant components (default: false, only returns component sets) |