View
viewRead file contents with line numbers or list directory contents to inspect local files and folders. Supports line ranges and shows directory structure two levels deep.
Instructions
View file contents or list directory.
For files:
Returns content with line numbers (format: " N\t")
Use view_range to read specific lines [start, end] (1-indexed, inclusive)
Large files are truncated at 16000 characters
For directories:
Lists contents with type indicator (/ for directories)
Shows 2 levels deep by default
Ignores hidden files and node_modules
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file or directory | |
| view_range | No | Line range [start, end] for text files (1-indexed, inclusive) |