find_nodes
Locate design elements by computed style or text content to find every instance using a token, value, or copy before bulk updates. Supports filters, wildcards, and color equivalence.
Instructions
Find nodes by computed style and/or text content — useful for locating everything using a given token, literal value, or piece of copy before a bulk update. Searches the whole page, or pass nodeId to scope to a node and its descendants. Pass filters, textValue, or both (AND).
filters are { styleName, styleValue } matchers combined with AND (color is X AND fontSize is Y). styleValue may be a literal ("#ff0000", "16px") or a token ("--color-primary"). Both fields accept "" wildcards and colors match by equivalence ("#ccc" == "rgb(204, 204, 204)"). A literal color query also finds token-bound usages (reported as the var(--token) reference), so to migrate a raw color to a token you can search the color directly. Omit one field to match any property or any value.
textValue matches Text node content, case-insensitive, with "" wildcards anchored to the whole value ("Submit", "Get *", "started").
Each result has its ID, name, component, and a matched array of the { styleName, styleValue } / { textValue } entries that satisfied the query; for a color or token found inside a composite value (gradient/border), styleValue is the matched fragment, not the whole value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | No | Optional. The Paper file ID this call should act on. Pass it to reliably target a specific file when several are open at once (e.g. multiple agents from the same session working in parallel). Omit to use the most recently opened file in the session. | |
| nodeId | No | Restrict the search to this node and its descendants. Omit to search the whole page. | |
| filters | No | Style matchers combined with AND — a node must satisfy every one (plus `textValue`, if given). | |
| textValue | No | Match Text node content. Case-insensitive; "*" is a wildcard anchored to the whole value ("foo*", "*foo*", "foo*bar"). AND-combined with `filters`. |