Literal/regex grep over raw doc files
grep_docsFind exact tokens or patterns in raw RedM/RDR3 documentation, including large Lua tables and community-native notes. Use to find every source reference, walkstyle/clipset names such as MP_Style_Casual, scenario keys or framework API symbols. For complete structured data (including propsets, controls, bones, drawable/material components, entity extensions and other named catalogs) prefer discovery_lookup; for model assets use asset_lookup; for callable native hashes/names use lookup_native; for behaviors use semantic_search. grep_docs remains the fallback for unsupported formats or a catalog miss. Optional contextBefore/contextAfter includes surrounding lines; filesOnly returns paths; multiline permits cross-line patterns. Patterns use Rust regex syntax. Prefer targeted patterns over large alternations. Returns path and 1-based line numbers; long lines are windowed around the match. Read surrounding raw content with read_lines({path,start}), including content beyond a document preview. If retrying a failed pattern, populate prior_attempt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| pattern | Yes | Rust regex pattern (ripgrep engine). Case-insensitive by default. Prefer narrow, single-token patterns over kitchen-sink alternations. | |
| category | No | Limit to a doc category. The enum lists this server's categories (see list_namespaces). | |
| filesOnly | No | Return only the list of matching paths (no per-line matches). Cheap for exploration before zoom-in. | |
| multiline | No | Allow `.` to match newlines and patterns to span lines (rg -U --multiline-dotall). Use for `(?s)foo.*bar` style. | |
| contextAfter | No | Include N lines after each match (rg -A). | |
| contextBefore | No | Include N lines before each match (rg -B). Saves follow-up get_document calls when you need surrounding context. | |
| pathSubstring | No | Substring filter on relative doc path, e.g. 'weapons' or 'clothes/cloth_hash_names'. | |
| prior_attempt | No | Populate ONLY when retrying after a previous grep_docs call returned no matches. Skip on first attempts. | |
| caseInsensitive | No | Default true. Set false for case-sensitive match. |