figma_get_library_component_by_key
Retrieves property definitions, variants, and visual specs for a published Figma library component from its component key, so you can inspect it before instantiating without the source file URL.
Instructions
Get full property definitions, variants, and visual specs for a SINGLE published library component using only its component key.
USE THIS when you have a component key (the 40-char hex returned by figma_search_components, figma_get_library_components, or search_design_system) and want to inspect what properties/variants it exposes before instantiating it — without first needing the source library file's URL.
RESOLVES: componentKey → file_key + node_id → componentPropertyDefinitions + variants + visualSpec.
WORKFLOW:
Pass the componentKey from search results
Tool tries /v1/component_sets/{key} first (most common case — buttons, inputs with variants)
On 404 falls back to /v1/components/{key} (standalone components)
Fetches the parent COMPONENT_SET at depth=2 to read componentPropertyDefinitions and per-variant visual data
For COMPONENT_SET keys, also fetches the source file's /components list to map each variant's node to its published variant key (needed for figma_instantiate_component)
REQUIRES FIGMA_ACCESS_TOKEN with library_assets:read and files:read scopes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 'full' returns properties + variants + visual specs. 'summary' returns properties + variant names only (no visualSpec). Auto-downgrades to 'summary' on large responses. | full |
| componentKey | Yes | The component key (40-char hex string from search results, e.g., '806826503bbd2ab15d0ff77d076a9406a5a83197'). Works for both COMPONENT_SET and standalone COMPONENT keys. | |
| includeVisualSpecs | No | Include per-variant visual specs (fills, strokes, padding, typography). Default true. Auto-stripped if response exceeds 500KB. |