silica_read
Read a located file slice, heading section, or PDF page before citing it; returns outline, version, and truncation/next_start details so you can verify and continue.
Instructions
Read a located slice before citing it: lines start..end, one
section by heading, a PDF page, or the whole file when it fits
max_chars, always with the outline and a version;
truncated and next_start say how to continue. A PDF is served from
its own text layer, page by page: section="p. 8" serves one page —
the whole page, ~1.2k tokens (measured 2026-09-09), so ask for it to cite
a passage a search located, and widen the search's width to explore —
pages counts them, page_map gives the pages the slice covers, and
extract_path is that text on disk, for grep and the harness's own
reader (a cache, rebuilt when the PDF changes, under no version
guard). A PDF or office file with a .md extracted beside it is served
from that instead, and source_state says whether the original still
hashes to what the conversion recorded: stale means the PDF changed
and the .md did not, unverifiable that the sidecar records no hash or
its original is gone. Reading the .md itself, the path a search hit
carries, reports the same source and source_state.
Either way source names the original, and a PDF
with no readable text layer is error.unconverted. Carry
version forward as expect_version to be refused instead of reading
different bytes under an old citation; version is the served text's,
never the original's.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Last line; 0 = to the end, under max_chars | |
| path | Yes | Root-relative file path (from silica_files or a search hit) | |
| start | No | First line, 1-based | |
| section | No | Serve this heading's section instead (exact title or unique prefix) | |
| max_chars | No | Cap on the served text | |
| expect_version | No | Refuse with error.changed when the file's version differs |