figma_search
Search Figma files for nodes by layer name or text content, supporting literal, regex, and instance override matching.
Instructions
Find nodes by name (and optionally text content). The query is a literal substring, case-insensitive unless case_sensitive: a name like Icons/Arrow/Left or /Card [v2]/ matches itself. Only regex=true reads it as a pattern, bare or /pattern/flags, and an invalid pattern is an error. With include_text, component instances are expanded, so strings that only exist as instance overrides or component property values are matched too, each tagged with via (direct/instance) and, where they apply, component, variant and frame. Name matching sees only real layers: layer names inside a collapsed instance live in its main component, so search that component instead. A hit's characters is a preview: longer text is cut to its first 120 characters followed by ... and flagged charactersTruncated (truncated, next to it, is about the number of results); figma_get_text returns the strings whole. When the text pass runs, unresolvedInstances counts the instances whose text could not be resolved and so was not searched (figma_get_text names the components); it is absent when the pass did not run. Pages in exclude_pages, or by default in the project's excludePages, are skipped before the limit is counted; excludedPages names the ones this search left out. Dated by exportedAt and account, or fileModifiedAt for a file read from disk, as the server's instructions say (figma-reader help on the command line).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help) | |
| page | No | Restrict to page name | |
| limit | No | Default 50 | |
| query | Yes | Name or text to find. A literal substring unless regex is set, so slashes and characters like [ ] ( ) . * match themselves | |
| regex | No | Read the query as a regex, bare or /pattern/flags, and report an invalid one. Default false: the query is a literal substring however it is written | |
| types | No | Node types to match, e.g. FRAME, COMPONENT, INSTANCE, TEXT. A list without TEXT also turns include_text off, since every text hit is a TEXT node; an empty list is no filter at all | |
| node_id | No | Search only this node and everything under it, like 12:34 (or 12-34); a node-id in the file URL is used when it is omitted, and the document's own id (0:0) is the whole file | |
| refresh | No | Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help) | |
| include_text | No | Also match text content, including text rendered inside instances | |
| exclude_pages | No | Pages to skip, by name as page takes it. They are left out while walking, so their hits neither fill the limit nor count in total. Default: excludePages in the project's .figma-reader.json, unless page or a node_id other than the document's own (0:0) is given; an empty list searches every page | |
| case_sensitive | No | Match case (default false, for a regex too) | |
| include_hidden | No | Include text on layers hidden in the design (default false) |