figma_search
Search Figma designs by layer name or text content, including text inside instances, with optional regex and node filters.
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. The result is dated by the copy it answers from. exportedAt is the ISO-8601 time this tool exported that snapshot through the browser: report what the design said then rather than as current, and pass refresh to export it again. For a local .fig the field is fileModifiedAt, that copy's own file time, which copying, syncing or re-downloading the file resets: the design data can be older than it says, and nothing here can date it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to a local .fig file, or a Figma file key / figma.com/design/... URL. A node-id in the URL is used when this tool takes node_id and it is omitted; a tool that answers about the whole file ignores it. A key or URL uses a local '<name> [<key>].fig' from FIGMA_FILES_DIRS when one exists, otherwise exports through the browser. | |
| 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 | |
| refresh | No | Skip local/cached copies and export the live file through the browser. Has no effect when file is a path to a .fig: that file is read as it is on disk and the result carries refreshIgnored; pass the key or URL to export the live file instead. | |
| include_text | No | Also match text content, including text rendered inside instances | |
| case_sensitive | No | Match case (default false, for a regex too) | |
| include_hidden | No | Include text on layers hidden in the design (default false) |