read_file
Retrieve the full text of an indexed document, optionally within a start and end line, to inspect context around search hits.
Instructions
Read the text of one indexed document, optionally a line range.
Use after search to pull full context around a hit. path must lie
inside a registered folder — anything else is refused (this server
never reads outside registered folders). Plain-text formats (txt, md)
return the raw file; binary formats (pdf, docx, html) return the
extracted text, paragraphs separated by blank lines.
start_line/end_line are 1-based and inclusive; omit both for the
whole file. Output is capped at ~100k characters; truncated is true
if the cap hit, in which case request a narrower line range.
Returns {ok, path, start_line, end_line, total_lines, truncated, text}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| end_line | No | ||
| start_line | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||