search_scripts
Find every occurrence of a substring across all scripts in a Purl project, returning the target, script name, line number, and matching line. Use it to locate where a variable or function is referenced before editing.
Instructions
Search every script in the project (all cell-script tabs and all object-level scripts, templates included) for a substring. Returns one entry per matching line with target/scriptName/lineNumber/line so the result is directly actionable. Pass contextLines: N to also return the N lines above and below each match — usually enough to skip a follow-up get_script call. Use this whenever you need to answer "where is X used / set / played / spawned / destroyed / handled" before making changes — the only reliable way to enumerate distributed Purl logic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Substring to find. Case-sensitive by default; pass caseInsensitive: true to relax. | |
| cellName | No | Optional: restrict search to a single cell (by label). Default searches all cells. | |
| contextLines | No | Optional: number of lines of context to include above and below each match (returned as contextBefore / contextAfter arrays on each match). Default 0 (no context). Capped at 20. | |
| caseInsensitive | No | Optional: when true, match case-insensitively. Default false. |