Read
redctx_readRead a single file or an inclusive line range, returning redacted text with preserved line numbers so you can cite exact lines.
Instructions
Return the redacted text of one file, or an inclusive 1-based line range of it, after a header line --- @p_<id> <redacted path> lines S-E ---. Use it to read a single file or cite exact lines; use redctx_bundle to load several whole files in one call, and redctx_search or redctx_retrieve to locate the lines first. Redaction preserves line numbering, and text beyond max_chars is cut with a [TRUNCATED] marker that never splits a placeholder. Binary, excluded or protected files and files over the server's per-file byte limit (5 MB by default) are refused with an error; DOCX, PPTX, PDF, XLSX and XLS files are readable as extracted Markdown only when the server runs with --documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File to read: an `@p_<id>` reference from earlier output or a root-relative path. | |
| end_line | No | Last line to return, 1-based and inclusive; values past the end of the file are clamped. Default: the last line. | |
| max_chars | No | Maximum characters of file text returned after the line range is applied; longer text is cut and ends with `[TRUNCATED]`. Default 120000. | |
| start_line | No | First line to return, 1-based and inclusive. Default 1. Must not exceed `end_line`, or the file's last line when `end_line` is omitted. | |
| line_numbers | No | Prefix each line with its source line number and a tab. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The tool output, identical to the text content block and already redacted: sensitive values appear as deterministic `[CATEGORY_<hex>]` placeholders (forms declared as aliases of one entity share its hex and add a form suffix, `[CATEGORY_<hex>.<form>]`) and files as `@p_<id>` references. When the result has `isError: true`, this is a fixed error message instead, such as a limit error or the notice that context access is blocked until the operator repairs the local redaction config. | |
| receipt | Yes | Redaction statistics for this call only; never contains original values. |