Read
The Read tool reads the contents of a local file and makes it available to the AI. It supports text files, images, and PDFs.
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 base64-encoded data
- PDFs: Extracts and returns the text content
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 — the AI will read them automatically
- For large files, the AI may read specific sections using line ranges