AI makes mistakes! Undisk makes recovery instant: every write is versioned, every file is reversible.
See it heal →

What it does

Read a file’s current content and metadata from the Undisk workspace. Text files return UTF-8 content directly. Binary files return base64 content with encoding=‘base64’ and a mimeType field. Size in bytes, SHA-256 content hash, last-modified timestamp, and current version number are always included. Each result includes a browser_url — a permanent link the human user can open in their browser to view the file. Large text files (over ~10 KB) are automatically truncated with pagination metadata — use line_start/line_end to read remaining content. Use list_files to discover available paths first.

Required scope

files:read

Parameters

ParameterTypeRequiredDescription
pathstringYesFile path within the workspace (e.g., ‘docs/readme.md’)
version_idstringNoOptional version ID to read a specific historical version instead of the current one. Use list_versions to find version IDs. This is read-only — it does not modify the file’s current state (unlike restore_version).
line_startnumberNoFirst line to return (1-based, inclusive). Negative values count from the end (e.g., -10 = 10th line from the end). Only applies to text files. Omit to start from line 1. Example: line_start: 1, line_end: 10 returns the first 10 lines.
line_endnumberNoLast line to return (1-based, inclusive). Negative values count from the end (e.g., -1 = last line). Only applies to text files. Omit to read through the last line.