Skip to main content
Glama

Read a document

ragdown_read_doc
Read-only

Reads a Markdown file from the documents folder, whole or by line range, for full uncut context. Use it to inspect text around a search hit or follow a wikilink.

Instructions

Read a Markdown file from the documents folder, whole or by line range, straight from disk. Never clipped. Use it to see the context around a ragdown_recall hit, or to follow a [[wikilink]] in a document. The first line is 'path:start-end of total_lines (hash …)', the hash being the whole file's, for base_hash; the text follows from the second line, exactly as it is in the file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "ragdown_read_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath relative to the documents root, as returned by ragdown_recall, or a wikilink target as written inside [[...]] ('Note', 'Note#Heading', 'sub/Note'); a heading narrows the text to that section
end_lineNo
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv6.10.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / end_line / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / start_line / maximum
      Added value: +9007199254740991
  2. Changed1 schema field changedv5.16.0
    • changedInput schema / properties / path / description
      Previous value: -"Path relative to the notes root, as returned by ragdown_recall, or a wikilink target as written inside [[...]] ('Note', 'Note#Heading', 'sub/Note'); a heading narrows the text to that section"New value: +"Path relative to the documents root, as returned by ragdown_recall, or a wikilink target as written inside [[...]] ('Note', 'Note#Heading', 'sub/Note'); a heading narrows the text to that section"
  3. Changed1 schema field changedv5.2.0
    • changedInput schema / properties / path / description
      Previous value: -"Path relative to the notes root, as returned by ragdown_recall"New value: +"Path relative to the notes root, as returned by ragdown_recall, or a wikilink target as written inside [[...]] ('Note', 'Note#Heading', 'sub/Note'); a heading narrows the text to that section"
  4. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint=false, and the description goes well beyond: it promises 'never clipped' output (contrasting implicitly with recall excerpts), discloses the exact first-line header format including that the hash is of the whole file 'for base_hash', and states the text follows verbatim from line two. This is exactly the behavior an agent needs to chain into ragdown_edit.

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?

Front-loaded with the core action and scope in the first sentence, with usage and return format following in a logical order. Dense but nearly every clause carries information; the 'Never clipped.' fragment is emphatic but earns its place as a differentiator.

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

Completeness4/5

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

There is no output schema, yet the description explains the return shape (header line plus verbatim body), which is the critical missing piece. It lacks only error/edge-case behavior — missing path, invalid heading — which keeps it from a 5 for a file-reading tool.

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

Parameters4/5

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

Schema coverage is only 33% — only `path` is documented — but the description compensates by explaining 'whole or by line range' and by showing that the returned header reports 'start-end of total_lines', which teaches the line-numbering convention. It still leaves gaps for start_line/end_line (defaults, 1-indexing, behavior when only one bound is supplied).

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?

Specific verb and resource: 'Read a Markdown file from the documents folder, whole or by line range, straight from disk.' It also distinguishes itself from siblings by naming ragdown_recall hits and [[wikilink]] following as its entry points, so an agent can tell it apart from ragdown_context or ragdown_recall without opening a schema.

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

Usage Guidelines4/5

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

It gives two concrete triggering scenarios: inspecting context around a ragdown_recall hit, and following a wikilink. That is clear when-to-use guidance, but there is no explicit when-not (e.g. 'do not use this to search by content') nor a direct naming of ragdown_context as the alternative for broader context.

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