Grep across all scripts in the game
script-grepSearch decompiled Roblox scripts using regex or literal strings to find code patterns or exact identifiers.
Instructions
Search decompiled Roblox scripts with JavaScript regex or literal string matching. Use for exact identifiers or code patterns; use semantic-search-scripts when behavior is known but names are not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search pattern. Supports JavaScript RegExp syntax: \d, \w, \s, \b, character classes [a-z], alternation (foo|bar), quantifiers (+, *, ?), groups, lookaheads, etc. Use the literal flag for exact string matching. | |
| limit | No | Maximum number of scripts to return results from (default: 50) | |
| contextLines | No | Number of lines of context to show before and after each match (default: 2) | |
| maxMatchesPerScript | No | Maximum number of matches to return per script (default: 20) | |
| maxResults | No | Maximum total number of matches across ALL scripts (default: unlimited). Use this to cap total matches, e.g. maxResults=1 to find just the first match. | |
| literal | No | When true, treats the query as a plain literal string - no regex interpretation. Equivalent to grep -F / ripgrep -F. (default: false) | |
| caseSensitive | No | When false, matches case-insensitively. Equivalent to grep -i. (default: true) |