penpot_list_components
List all components in a Penpot file (and optionally from linked libraries), returning IDs and properties needed to add component instances.
Instructions
List a file's existing components (from its components map), instead of requiring the caller to have created them itself in the same session or parse penpot_get_file_snapshot's data.components by hand. Each entry includes the componentId (usable with penpot_add_component_instance), name, mainInstanceId/mainInstancePage, and — for variant components — variantId/variantProperties. Set includeLibraries: true to also include components from connected shared-library files (each library component entry will carry a libraryFileId field for use with penpot_add_component_instance).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | ||
| includeLibraries | No | When true, also list components from all shared-library files that are linked to this file. Each library component entry will include a libraryFileId and libraryFileName field. Pass the libraryFileId to penpot_add_component_instance to place an instance of that component. |