penpot_get_shape
Retrieve a single shape by ID from a page, with optional descendant nesting and component link status (main, linked with drifted fields, or detached).
Instructions
Look up a single shape by id on a page, without pulling the whole page via penpot_get_file_snapshot. By default, nests the shape's full descendant subtree (frames/groups' children) under its "shapes" field instead of leaving them as bare ids; set includeDescendants to false for just the shape itself, or maxDepth to cap how many levels deep the nesting goes. Always includes a "componentInfo" field reporting the shape's component link state: "not-an-instance" (plain shape), "main-component-root" (the component's own main instance), "linked" (a placed copy linked to a component — also includes driftedFields listing any field names whose value on this instance differs from the main component's current definition), or "detached" (componentId present but the component no longer exists in this file).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | ||
| pageId | Yes | ||
| shapeId | Yes | ||
| maxDepth | No | ||
| includeDescendants | No |