search_code
Search JavaScript source code across loaded scripts to find specific keywords or patterns for reverse engineering and debugging purposes.
Instructions
Search for a keyword across all loaded JavaScript sources in the page.
Fetches each script's source and searches for the keyword, returning matching lines with 2 lines of surrounding context.
Args: keyword: The keyword or pattern to search for (case-sensitive substring match). max_results: Maximum number of matches to return (default 50, max 200).
Returns: dict with matches list, total_matches count, scripts_searched count, and scripts_with_matches list. When results are truncated, total_matches shows the real total so you know how many were omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| max_results | No |