read
Read a file and get full content, an 'unchanged' indicator on re-read, or a unified diff when modified, reducing token usage with intelligent caching.
Instructions
Read a file with token-efficient caching. For 2+ files, use batch_read.
Returns full content on first read, "unchanged": true on re-read of an
unchanged file (content already in your context — do NOT re-read), or a
unified diff when modified. Use offset/limit to recover line ranges
after truncation.
Args:
path: File path (absolute or relative to project root). Use absolute
paths for files outside the current project root.
max_size: Maximum content size to return before summarization.
offset: 1-based starting line number for targeted reads. 0 is
treated as "from the start" (equivalent to omitting).
limit: Number of lines to return from offset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_size | No | ||
| offset | No | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | ||
| path | No | ||
| content | No | ||
| lines | No | ||
| unchanged | No | ||
| is_diff | No | ||
| semantic_match | No | ||
| total_tokens | No | ||
| hint | No | ||
| from_cache | No | ||
| tokens_saved | No | ||
| tokens_original | No | ||
| tokens_returned | No | ||
| params | No | ||
| is_binary | No | ||
| size | No | ||
| mime | No | ||
| content_hash | No | ||
| total_lines | No |