search_code
Search for a keyword across all loaded scripts or within a single script. Returns matches with surrounding context, supporting both line and character modes.
Instructions
Search keyword in loaded scripts (v0.9.0 unified).
Replaces search_code (all scripts) + search_code_in_script (single script).
Args: keyword: The keyword to search for (case-sensitive substring match). script_url: If None, search across ALL loaded scripts. If given, search within that one script only (supports "inline:" for inline scripts). Single-script mode auto-detects minified files and uses character-based context. context_chars: Context window in char mode (default 200 = +/-200 chars). Used when searching single minified scripts. context_lines: Context window in line mode (default 3). max_results: Maximum matches to return (default 200).
Returns: dict with matches, total_matches, mode ("line" | "char"), etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| script_url | No | ||
| context_chars | No | ||
| context_lines | No | ||
| max_results | No |