Skip to main content
Glama

read_source

Read-only

Read a source document's exact text in citation-ready units (heading, row, sheet, line) with anchors, so you can quote and cite DOCX, XLSX, CSV, or text files during Compile, Check, or ask turns.

Instructions

Vault source documents only; repository code is read through analyze_repo_structure sourceReads. Read the text of one raw source under sources/, cut into the units a wiki citation names (docs/ONTOLOGY-ATLAS-SPEC.md §11): a DOCX by heading (h:<slug>; paragraphs before the first heading are p1), an XLSX by sheet and row (s<n>r<m>), a CSV by row (r<n>), a text or HTML file by line (l<n>). Each unit carries the exact anchor to write into [[src:sources/<file>#<anchor>]], so a page cites what it quotes. A PDF returns no text: the agent runtime reads PDFs natively, page by page, and cites #p<n>. Nothing is converted and kept — the file is read on request and the text returned once. Paging: from (1-based unit index) and limit (default 200, max 1000); when truncated is true, next is the from to continue with. sheet narrows a workbook to one sheet number. Returns { path, format, unitCount, from, units: [{anchor, text, kind, heading?, sheet?}], truncated, next?, sha256, note? }. side effect 0. Use it in place of a shell command when a Compile, Check or ask turn needs what a DOCX or XLSX says.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNo1-based index of the first unit to return. Default 1.
pathYesVault-relative path under `sources/` (`sources/plan.docx`).
limitNoUnits to return at most. Default 200.
sheetNoXLSX only: return one sheet, by its number in workbook order.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYes
nextNo
noteNo
pathYes
unitsYes
formatYes
sha256Yes
truncatedYes
unitCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.8/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint/destructiveHint annotations, disclosing that nothing is converted and kept, that PDFs return no text, that the file is read on request and returned once, how paging/truncation works, and that the side effect is zero. No contradiction with annotations is present.

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 dense and long, but every sentence earns its place: scoping, unit definitions, PDF caveat, persistence behavior, paging, and when to use it. It is front-loaded with the most important distinction first, but the sheer volume of detail keeps it from being maximally concise.

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?

Given the output schema, annotations, and sibling context, the description is complete. It explains unit kinds, anchor citation format, paging, the PDF exception, and the non-persistent read behavior—leaving no decision-relevant gap for an agent trying to invoke the tool 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?

The schema already documents all four parameters with 100% coverage, so the baseline is 3. The description adds meaningful semantics on top: how units are indexed per file type, what anchors look like, how `from`/`limit`/`truncated`/`next` interact, and the `sheet` narrowing behavior. That added context justifies a 4 rather than a flat baseline.

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 a precise scope boundary ('Vault source documents only; repository code is read through analyze_repo_structure') and names a specific verb and resource: 'Read the text of one raw source under sources/'. It distinguishes itself from sibling tools by defining exactly what it does and what it does not cover.

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?

The description explicitly states when to use the tool: 'Use it in place of a shell command when a Compile, Check or ask turn needs what a DOCX or XLSX says.' It also gives an alternative for repository code, analyze_repo_structure, and warns that PDFs are not handled here because the runtime reads them natively.

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