read_source
Retrieve text from raw source files (DOCX, XLSX, CSV, HTML) as units with citation anchors for exact quoting and verification in wiki pages.
Instructions
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
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | 1-based index of the first unit to return. Default 1. | |
| path | Yes | Vault-relative path under `sources/` (`sources/plan.docx`). | |
| limit | No | Units to return at most. Default 200. | |
| sheet | No | XLSX only: return one sheet, by its number in workbook order. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | ||
| next | No | ||
| note | No | ||
| path | Yes | ||
| units | Yes | ||
| format | Yes | ||
| sha256 | Yes | ||
| truncated | Yes | ||
| unitCount | Yes |