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

A4.9/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true, but the description adds substantial behavioral details: Rust regex engine, case-insensitive default, ±60 character windowing on long matches, and the special limitation that preview-only mega-tables require read_lines instead of get_document. These go well beyond what annotations convey, with no contradictions.

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

Conciseness4/5

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

The description is long but every section earns its place: purpose, use cases, exclusions, mega-table behavior, parameter tips, regex syntax, and retry protocol. It is front-loaded with the core verb and resource, and the paragraphing keeps it scannable, though it could be tightened slightly.

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?

For a 10-parameter tool with no output schema, the description covers return format (matched lines with path and line number), special constraints for mega-tables, retry semantics, and how to read around hits. It leaves minimal ambiguity and pairs well with the sibling tool descriptions.

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?

Despite 90% schema coverage, the description enriches parameter meaning: contextBefore/contextAfter saves a follow-up get_document call, filesOnly is described as cheap exploration, multiline enables (?s) patterns, and prior_attempt is populated only on retries. This adds functional context the schema does not provide.

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 'Find an EXACT literal token in raw doc files (markdown + lua)', which identifies the verb, resource, and scope precisely. It also distinguishes itself from siblings by naming semantic_search for concept queries and lookup_native for hash/name lookup, so the tool's unique purpose is unmistakable.

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?

It provides an explicit 'Use for' list (weapon/ped/animation names, known hashes, walkstyles) and an explicit 'NOT for' list with named alternatives. It also highlights REQUIRED usage for specific mega-tables and advises against large alternations, giving clear when-to-use and when-not-to-use guidance.

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.5/5.0
Disambiguation5/5

Each tool targets a distinct retrieval mode: structured asset lookup, script native resolution, exact token grep, semantic search, doc navigation, raw line access, and contribution. Descriptions explicitly cross-reference 'NOT for' cases, making misselection unlikely even where overlap exists.

Naming Consistency3/5

Names mix verb-object (lookup_native, get_document, read_lines), object-verb (asset_lookup), bare verbs (browse), and descriptive phrases (semantic_search). The verb 'lookup' appears as both suffix and prefix, and 'get'/'read' are used interchangeably for retrieval, though all names are lowercase snake_case and readable.

Tool Count5/5

10 tools is well-scoped for a documentation and reference server. Each tool fills a clear niche with no obvious bloat or redundancy, staying comfortably within the ideal 3-15 range.

Completeness5/5

The surface covers the full lifecycle of documentation access: orientation (list_namespaces), discovery (browse), exact and semantic search, native/asset lookup, full-content retrieval (get_document), raw line reading for large tables (read_lines), a calling-convention guide, and community contribution (share_finding). Known limitations in the data layer are addressed with companion tools.