15 lines
1.1 KiB
Plaintext
15 lines
1.1 KiB
Plaintext
Read a file or directory from the local filesystem. If the path does not exist, an error is returned.
|
|
|
|
Usage:
|
|
- The filePath parameter should be an absolute path.
|
|
- By default, this tool returns up to 2000 lines from the start of the file.
|
|
- The offset parameter is the line number to start from (1-indexed).
|
|
- To read later sections, call this tool again with a larger offset.
|
|
- Use the grep tool to find specific content in large files or files with long lines.
|
|
- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.
|
|
- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\n", you will receive "1: foo\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.
|
|
- Any line longer than 2000 characters is truncated.
|
|
- Call this tool in parallel when you know there are multiple files you want to read.
|
|
- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.
|
|
- This tool can read image files and PDFs and return them as file attachments.
|