search_in_sources
Locate function names, endpoints, literals, or code patterns in JS sources loaded by the selected debugger context, searching external, inline, and minified scripts without executing or pausing.
Instructions
Finds a known function name, endpoint, string literal, token, or code pattern in JavaScript loaded by the selected debugger context—the main frame by default, or the frame chosen with select_frame. It searches external, inline/eval, and minified sources in that context without executing or pausing the page, returning 1-based lines plus context-scoped scriptIds; URLs are the preferred selectors for URL-backed matches. Use select_frame first for iframe-specific source work, get_script_source for nearby context, save_script_source for a whole bundle, or set_breakpoint_on_text when runtime values are needed. For a known captured request, prefer get_request_initiator before a broad source search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Source text to locate, or a regular-expression pattern when isRegex=true. Prefer a distinctive function name, endpoint, property, or literal that can also anchor set_breakpoint_on_text. | |
| isRegex | No | Interpret query as a regular expression when true. Leave false for literal endpoint, token, and code-text searches. | |
| urlFilter | No | Case-insensitive script-URL substring used to narrow matches to a known bundle or domain. It excludes unnamed inline/eval scripts. | |
| maxResults | No | Maximum matches to return (default: 30). Narrow with urlFilter before increasing this for common text. | |
| caseSensitive | No | Match case exactly when true. Leave false for discovery; set true when choosing exact code text for a breakpoint. | |
| maxLineLength | No | Maximum characters in each matched-line preview (default: 150). Use get_script_source rather than a very large preview when surrounding context is needed. | |
| excludeMinified | No | Skip sources with very long lines when true. Keep the default false for reverse engineering because relevant code often exists only in compressed bundles. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool completed successfully. | |
| data | No | ||
| tool | Yes | Stable MCP tool name. | |
| error | No | ||
| summary | Yes | Concise human-readable outcome. |