Skip to main content
Glama

Literal/regex grep over raw doc files

grep_docs
Read-only

Find an EXACT literal token in raw doc files (markdown + lua). Use for specific weapon/ped/animation/prop/interior/zone names (weapon_pistol_volcanic, a_c_bear_01, p_campfire01x), known hashes (0x020D13FF), walkstyles/clipsets (MP_Style_Casual, mech_loco_m@), or any string you'd grep for. NOT for behavior/concept queries (use semantic_search) or script-native hash/name lookup (use lookup_native). REQUIRED for tokens inside the largest rdr3_discoveries data tables (audio_banks, ingameanims_list, cloth_drawable, cloth_hash_names, object_list, megadictanims, entity_extensions, imaps_with_coords, propsets_list, vehicle_bones) — only preview-indexed for embeddings, so semantic_search will NOT find tokens in them. Optional: contextBefore/contextAfter for ±N surrounding lines (saves a follow-up get_document call); filesOnly: true to get paths only (cheap exploration); multiline: true for cross-line patterns ((?s)foo.*bar). Pattern uses Rust regex syntax (rg engine). PREFER one targeted call over giant a|b|c|d|e alternations — split into separate calls; alternations rarely improve recall and bloat the regex automaton. Returns matched lines with path + line number. Long matched lines are windowed ±60 chars around the match (…); to read around a hit, use read_lines({path, start}) for the preview-only mega-tables listed above (get_document holds only their ~80-line head), or get_document({path}) for ordinary docs. If you are retrying after a previous pattern returned no matches, populate prior_attempt so the server can record what didn't work and steer alternative spellings.

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 (e.g. discoveries, natives).
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.

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description discloses return format (matched lines with path + line number), ±60 char windowing for long lines, and the fact that read_lines is needed for mega-tables because get_document only holds the ~80-line head. It also explains the prior_attempt retry mechanism. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence earns its place. It is front-loaded with the core purpose, then exclusions, parameter tips, return behavior, and fallback guidance. There is no repetition of schema fields and no irrelevant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all critical operational aspects: scope, exclusions, mandatory use cases, parameter hints, return format, windowing, how to read around hits, and retry behavior. For a complex tool with no output schema, this fully equips the agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 90%, the description adds strategic meaning: contextBefore/contextAfter saves a follow-up get_document call, filesOnly is cheap exploration, multiline enables cross-line patterns, and prior_attempt is for retries. It also provides concrete pattern examples that make parameter usage intuitive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Find an EXACT literal token in raw doc files (markdown + lua).' It lists concrete examples (weapon_ped_ names, hashes, walkstyles) and explicitly contrasts with semantic_search and lookup_native, making its distinct purpose immediately obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance (specific known strings) and when-not-to-use (behavior/concept queries -> semantic_search; script-native hash/name -> lookup_native). It also warns that semantic_search will miss tokens in the largest data tables and that grep_docs is REQUIRED there. The PREFER one-targeted-call guidance over alternations further steers usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: asset_lookup handles game-asset hashes/names, lookup_native handles script natives, grep_docs does exact token search, semantic_search handles concept/behavior queries, browse/list_namespaces orient, get_document/read_lines retrieve content, get_invoke_guide is a specialized reference, and share_finding contributes. The descriptions explicitly cross-reference when NOT to use each tool, eliminating ambiguity.

Naming Consistency4/5

Most tools follow verb_noun pattern (get_document, grep_docs, list_namespaces, lookup_native, read_lines, share_finding), but asset_lookup uses noun_verb order, and browse is a bare verb. The deviation is minor and the pattern remains predictable.

Tool Count5/5

10 tools is well within the ideal 3-15 range. Each tool earns its place: search, retrieval, discovery, lookup, and contribution are all covered without bloat. The count matches the server's purpose as a comprehensive documentation interface.

Completeness5/5

The domain is RedM/RDR3 documentation access, and the set covers the full lifecycle: orientation (list_namespaces, browse), search (semantic_search, grep_docs, lookup_native, asset_lookup), retrieval (get_document, read_lines, get_invoke_guide), and contribution (share_finding). There are no obvious dead ends or missing operations for the stated purpose.

Resources