Read
The Read tool reads the contents of a local file and makes it available to the AI. It supports text files, images, PDFs, and Office documents.
What It Does
Section titled “What It Does”- Reads the full content of a file at a given path
- Optionally reads a specific line range for large files
- Returns file content as text for the AI to analyze
Supported Formats
Section titled “Supported Formats”Read works with a wide range of file types:
- Text files: Source code (
.rs,.ts,.py,.go,.js,.jsx,.tsx, etc.), configuration files (.toml,.yaml,.json,.env), documentation (.md,.txt,.rst), data files (.csv,.xml,.html) - Images: PNG, JPEG, GIF, WebP, BMP, ICO, SVG — returns metadata (dimensions, size) and the pixels for vision-capable models. The AI can also ask a question about an image; the answer comes from the vision model when one is configured, so even text-only main models can work with images.
- PDFs: Extracts the text content, with optional page ranges for large documents. Scanned PDFs without a text layer come back as page images for vision-capable models
- Videos: MP4, MOV, M4V, WebM, MKV, AVI — returns metadata and sampled frames when ffmpeg is installed
- Web addresses: Read can also take a URL and return its raw content, such as a JSON or CSV file, when Web Fetch is enabled. Use Web Fetch for ordinary pages; it turns them into readable text
- Office documents:
.docx,.xlsx,.pptx(and macro-enabled variants) — Word and PowerPoint come back as extracted text, Excel as bounded sheet data with sheet and cell-range selection
When It’s Used
Section titled “When It’s Used”The AI uses Read when:
- You attach a file to the conversation
- It needs to inspect a specific file found via Glob
- You ask it to analyze, summarize, or explain a file’s contents
Example
Section titled “Example”“Read my
Cargo.tomland tell me which dependencies might have security concerns.”
The AI will read the file at the specified path and analyze the dependency list.
- You can drag and drop files directly into the ChatShell input to attach them, or type @ to pick a file from the working directory — the AI will read them automatically
- Text attachments too long to send in full include their beginning, and the AI reads the rest with Read when it needs it
- For large files, the AI may read specific sections using line ranges