search_in_sources
Search loaded JavaScript sources for a string or regex pattern, returning matching lines with script ID, URL, and line number for quick analysis.
Instructions
Searches for a string or regex pattern in all loaded JavaScript sources. Returns matching lines with script ID, URL, and line number. Use get_script_source with startLine/endLine to view full context around matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | Optional reverse-engineering goal for the task artifact. | |
| query | Yes | The search query (string or regex pattern). | |
| taskId | No | Optional reverse task ID for writing durable evidence artifacts. | |
| isRegex | No | Whether to treat the query as a regular expression. | |
| pageIdx | No | Browser page index to inspect (0-based). When omitted, uses the currently selected page. | |
| taskSlug | No | Optional reverse task slug used when opening the task artifact directory. | |
| targetUrl | No | Optional target page URL associated with the reverse task. | |
| urlFilter | No | Only search scripts whose URL contains this string (case-insensitive). | |
| maxResults | No | Maximum number of results to return (default: 30). | |
| caseSensitive | No | Whether the search should be case-sensitive. | |
| maxLineLength | No | Maximum characters per line preview (default: 150). Set to 0 for full lines. | |
| persistResult | No | Persist a single unambiguous match back into the reverse task artifact when task params are provided. | |
| excludeMinified | No | Skip minified files (files with very long lines). Default: true. |