read — web pages and documents → Markdown
The tool definitions cost ~650 tokens per request in total — they are kept short on purpose.
| Parameter | |
|---|---|
source | URL, local file path, or local directory path (~/, file://, and bare localhost:3000/… work) |
outline | Only list the sections: id, heading, estimated size |
section | Only return one section — an id from the outline, or heading text |
page | Page of the output (long output is split at paragraph boundaries) |
max_chars | Page size, default 20,000 characters (~5k tokens) |
js | Render in headless Chrome first; happens automatically when a page looks empty |
Supported: HTML/web pages, PDF, DOCX, XLSX, PPTX, JSON, diff/patch (including GitHub PR and commit URLs), ZIP archives, log files, local directories (as a tree), and any other text file (Markdown, CSV, code…).
What it does per format
- Web pages — main-content extraction (Mozilla Readability), then Markdown. Scripts, styles, images, forms, nav/header/footer chrome, heading permalinks and
[12]citation marks are dropped; same-site links become short root-relative paths (/docs/x); tracking parameters (utm_*) are removed; tables and code blocks (with their language) are kept. - PDF — text per page under
## Page Nheadings. Running headers/footers and page numbers that repeat on most pages are removed. - DOCX — headings (from styles), bullet/numbered lists, bold/italic, links, tables. Deleted tracked changes are skipped.
- XLSX — each sheet as a Markdown table of displayed values; empty rows and columns dropped; hidden sheets marked.
- PPTX —
## Slide N: Title, bullets with nesting, tables, speaker notes; slide numbers/footers skipped. - Diffs/PRs — a GitHub PR or commit URL is fetched as its underlying diff automatically; local
.diff/.patchfiles work the same way. One## path (+N -M)heading per changed file; whitespace-only hunks are dropped with a note. - Directories — a token-aware tree: the root
.gitignoreis respected,.gitis always skipped, dependency directories collapse to one line, and any other directory with over 100 direct entries collapses to an item count. Files show their size. - ZIP archives — each member converted by its own format (nested archives and binaries are listed with their size, not expanded), as
## path (size)sections — sooutline/sectionpage through an archive like any other document. - Log files — lines matching common error/failure patterns (
ERROR,FATAL, stack traces, test failures…) plus a couple of lines of context around each; everything else collapses to an "N lines omitted" note.
Paged output ends with a hint such as [page 1 of 4 · next: page=2 · outline=true lists sections]. When a table or code block is split across pages, the table header is repeated and the code fence is closed and reopened, so every page stands on its own.
Next: read_json.