Get full RedM doc
get_documentFetch a RedM/RDR3 document or a complete discovery: record using the path returned by browse, semantic_search, discovery_lookup or grep_docs. For ordinary documents, heading selects a section (full breadcrumb or leaf; case-insensitive and fuzzy); deep sections include the parent's introduction. Structured discovery records include metadata and source commit/line references and need no heading. For animation/audio/IMAP/clothing/wearable/particle/flag/texture lookups start with discovery_lookup; for individual natives use lookup_native. Selected Lua files also support top-level catalog keys as heading; arbitrary source line ranges require read_lines with the raw sourcePath. Community findings use learning:N paths. Missing documents return available headings and recovery hints. Long pages: pass query (what you need) and/or maxTokens to get only the most relevant sections within budget; omitted sections are listed with their heading (and read_lines line range when known) so you can fetch them next. Pages over ~18k tokens are always trimmed this way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Use a returned path verbatim: a relative document path, learning:<id> for a finding, discovery:<id> for a structured discovery record, or refdoc:<slug> for a native reference table. For raw source lines use sourcePath with read_lines. | |
| query | No | Optional focus for long pages, e.g. `addItem metadata` or `remove weapon from inventory`. Sections are ranked by word/identifier overlap; only the best ones are returned (default budget ~6000 tokens unless maxTokens is set). Short pages are returned whole. | |
| heading | No | Optional prose heading from the doc, e.g. `Add Item to User` or `Character Management > Inventory Management`. Case-insensitive, fuzzy match on the leaf (text after the final `>`). NOT for code symbols — `addItem`, `getPlayerPed` etc. won't match; use `grep_docs` for those. | |
| maxTokens | No | Optional token budget for the returned content (500–18000). Larger pages are trimmed to the most relevant sections (by query, else from the top). |