Skip to main content
Glama

Literal/regex grep over raw doc files

grep_docs
Read-only

Find 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

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
patternYesRust regex pattern (ripgrep engine). Case-insensitive by default. Prefer narrow, single-token patterns over kitchen-sink alternations.
categoryNoLimit to a doc category. The enum lists this server's categories (see list_namespaces).
filesOnlyNoReturn only the list of matching paths (no per-line matches). Cheap for exploration before zoom-in.
multilineNoAllow `.` to match newlines and patterns to span lines (rg -U --multiline-dotall). Use for `(?s)foo.*bar` style.
contextAfterNoInclude N lines after each match (rg -A).
contextBeforeNoInclude N lines before each match (rg -B). Saves follow-up get_document calls when you need surrounding context.
pathSubstringNoSubstring filter on relative doc path, e.g. 'weapons' or 'clothes/cloth_hash_names'.
prior_attemptNoPopulate ONLY when retrying after a previous grep_docs call returned no matches. Skip on first attempts.
caseInsensitiveNoDefault true. Set false for case-sensitive match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Limit to a doc category (e.g. discoveries, natives)."New value: +"Limit to a doc category. The enum lists this server's categories (see list_namespaces)."
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "natives",
      -  "vorp",
      -  "rsgcore",
      -  "oxmysql",
      -  "discoveries",
      -  "jo_libs",
      -  "guides",
      -  "learnings"
      -]New value: +[
      +  "natives",
      +  "vorp",
      +  "rsgcore",
      +  "oxmysql",
      +  "discoveries",
      +  "jo_libs",
      +  "cfx",
      +  "guides",
      +  "learnings"
      +]
  2. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / prior_attempt / additionalProperties
      Removed value: -false
  3. Changed1 schema field changed
    • addedInput schema / properties / prior_attempt
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Populate ONLY when retrying after a previous grep_docs call returned no matches. Skip on first attempts.",
      +  "properties": {
      +    "pattern": {
      +      "description": "The previous pattern you tried.",
      +      "type": "string"
      +    },
      +    "why_unhelpful": {
      +      "description": "Why it didn't return what you needed (1 sentence).",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "pattern",
      +    "why_unhelpful"
      +  ],
      +  "type": "object"
      +}
  4. Changed5 schema fields changed
    • addedInput schema / properties / contextAfter
      Added value: +{
      +  "description": "Include N lines after each match (rg -A).",
      +  "maximum": 10,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / contextBefore
      Added value: +{
      +  "description": "Include N lines before each match (rg -B). Saves follow-up get_document calls when you need surrounding context.",
      +  "maximum": 10,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / filesOnly
      Added value: +{
      +  "description": "Return only the list of matching paths (no per-line matches). Cheap for exploration before zoom-in.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / multiline
      Added value: +{
      +  "description": "Allow `.` to match newlines and patterns to span lines (rg -U --multiline-dotall). Use for `(?s)foo.*bar` style.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / pattern / description
      Previous value: -"JS regex pattern. Case-insensitive by default."New value: +"Rust regex pattern (ripgrep engine). Case-insensitive by default. Prefer narrow, single-token patterns over kitchen-sink alternations."
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.