Skip to main content
Glama

Get full RedM doc

get_document
Read-only

Fetch 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

TableJSON Schema
NameRequiredDescriptionDefault
pathYesUse 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.
queryNoOptional 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.
headingNoOptional 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.
maxTokensNoOptional token budget for the returned content (500–18000). Larger pages are trimmed to the most relevant sections (by query, else from the top).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / maxTokens
      Added value: +{
      +  "description": "Optional token budget for the returned content (500–18000). Larger pages are trimmed to the most relevant sections (by query, else from the top).",
      +  "maximum": 18000,
      +  "minimum": 500,
      +  "type": "integer"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "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.",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / path / description
      Previous value: -"Doc path. Two valid shapes: (a) `<category>/<file>.md` for docs, e.g. `vorp/vorp_core_docs.md`; (b) `learning:<id>` for community findings, e.g. `learning:11`. Use the path returned by `browse`/`semantic_search`/`grep_docs` verbatim — do not invent `learnings/<slug>.md`."New value: +"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."
  3. Changed2 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
  4. Changed2 schema fields changed
    • changedInput schema / properties / heading / description
      Previous value: -"Optional heading. Matches case-insensitive on full path or last segment."New value: +"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."
    • changedInput schema / properties / path / description
      Previous value: -"Relative path, e.g. vorp/vorp_core_docs.md"New value: +"Doc path. Two valid shapes: (a) `<category>/<file>.md` for docs, e.g. `vorp/vorp_core_docs.md`; (b) `learning:<id>` for community findings, e.g. `learning:11`. Use the path returned by `browse`/`semantic_search`/`grep_docs` verbatim — do not invent `learnings/<slug>.md`."
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), yet the description adds substantial behavioral context: missing documents return available headings and recovery hints, deep sections include the parent's introduction, pages over ~18k tokens are always trimmed, and omitted sections are surfaced with heading plus read_lines range. This is well beyond what the annotations provide.

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?

Purpose and the routing rule are front-loaded in the first two sentences, and no sentence is pure filler. It is dense with many distinct clauses, which costs some readability, but nearly every clause carries actionable routing or behavioral information.

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?

No output schema exists, so the description carries the return-value burden, and it does: structured discovery records include metadata and commit/line references, long pages are trimmed with omitted sections listed, and missing documents yield headings plus recovery hints. Nothing an agent needs to invoke it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents path, query, heading and maxTokens in detail; the description largely reinforces these. It adds minor interplay context (query ranking with a default ~6000 budget when maxTokens is unset) but no significant meaning the schema lacks, so the baseline 3 is correct.

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?

States a specific verb+resource ('Fetch a RedM/RDR3 document or a complete discovery:<id> record') and immediately anchors it to paths returned by browse, semantic_search, discovery_lookup and grep_docs. An agent can distinguish this retrieval tool from grep_docs, lookup_native and read_lines without opening any schema.

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?

Explicitly routes the agent: 'for animation/audio/IMAP/... start with discovery_lookup; for individual natives use lookup_native', and 'arbitrary source line ranges require read_lines with the raw sourcePath'. It names the alternatives and the conditions that select them, including when NOT to use this tool.

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.

Resources