figma_get_code_layers
Locate Figma code layers (CODE_INSTANCE) on a page or across a file to retrieve their position, size, page, and linked dev resources or source links.
Instructions
Find code layers (Figma's React code layers, node type CODE_INSTANCE) on the current page or across the file, with position, size, page, and any dev resources or related links (e.g. the GitHub source). The Plugin API and REST API expose code layers as rendered layers only: their source and props can't be read or edited, and new code layers can't be created through them. Create or edit code layers in Figma, through a GitHub import, or with Figma's own MCP server (send_code_to_figma). Use figma_capture_screenshot with a code layer's id to see it. Figma only returns links while the file's window is focused; otherwise the result has linksUnavailable: true and omits them. Requires Desktop Bridge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| scope | No | Search the current page (default) or every page | page |
| fileKey | No | Local Mode only. Run against this connected file instead of the active file. Rejected in Cloud Mode. |