Skip to main content
Glama

Read a document

read_document
Read-onlyIdempotent

Read one document in a wiki. Without section, returns the full Markdown (frontmatter stripped) plus a provenance footer. To save tokens on a long page, pass section (a heading title as it appears in the page body, or its slug anchor) to retrieve ONLY that section and its subsections. The Markdown may contain [[wikilinks]] to related docs — follow one by calling read_document with path "wiki/.md" (drop any "#anchor" or "|label"). Exception: on a page under wiki-xl/, links whose first folder is not concepts, entities, summaries, syntheses, presentations or journal (e.g. [[reference/...]], [[guides/...]], [[history/...]]) are XL pages: use "wiki-xl/.md".

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": {
      "wiki": "<wiki>",
      "path": "<path>"
    },
    "name": "read_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDocument path within the wiki, e.g. "wiki/concepts/setup.md".
wikiYesWiki slug, e.g. "llama-cpp".
sectionNoOptional. A section anchor or heading title to read just that part.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description still adds real context: frontmatter is stripped, a provenance footer is appended, and `section` returns only that section plus its subsections — details an agent could not infer from annotations.

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-loads the core behavior and the token-saving tip before the longer wikilink-resolution paragraph. The wikilink and XL-exception sentences are dense but each carries operational information; nothing is obviously redundant.

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?

With no output schema, the description still tells the agent what comes back (full Markdown with frontmatter stripped, plus a provenance footer) and how partial reads behave. For a three-parameter read tool, that covers what an agent needs to call it correctly.

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 100%, so the baseline is 3. The description goes beyond it by explaining that `section` accepts either a heading title as it appears in the body or a slug anchor, and by giving path construction rules for wikilinks (drop '#anchor' or '|label', use the wiki-xl prefix in specific cases).

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

Purpose4/5

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

Opens with a specific verb and resource ('Read one document in a wiki') and immediately describes the two modes (full Markdown vs. single section). It does not explicitly name a sibling like search or list_wikis to contrast against, so differentiation is implied by 'one document' rather than stated.

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?

Gives a concrete when-to-use rule for the optional `section` parameter ('to save tokens on a long page') and a follow-up procedure for wikilinks, including the wiki-xl exception. Missing only guidance on when to prefer this over search/list_wikis for discovery.

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.