Skip to Content
ReferenceToolsFile System

File System Tools

Tools for reading, writing, editing, listing, and searching files.

All file tools operate within the project root (the directory where proto was started). Paths must be absolute.

list_directory

Lists the contents of a directory.

ParameterRequiredDescription
pathYesAbsolute path to the directory
ignoreNoGlob patterns to exclude
respect_git_ignoreNoRespect .gitignore (default: true)

Returns directories first, then files, alphabetically. No confirmation required.

read_file

Reads a file and returns its content. Supports text, images, PDFs, audio, and video (modality must be supported by the active model).

ParameterRequiredDescription
pathYesAbsolute path to the file
offsetNo0-based line number to start reading from (requires limit)
limitNoMaximum lines to read

For large files, content is truncated and the response indicates how to paginate. No confirmation required.

write_file

Writes content to a file. Creates the file (and parent directories) if they don’t exist; overwrites if it does.

ParameterRequiredDescription
file_pathYesAbsolute path to write to
contentYesContent to write

Requires confirmation (unless approval mode is auto-edit or yolo).

edit

Replaces a specific string within a file. Requires the old string to match exactly (including whitespace and indentation).

ParameterRequiredDescription
file_pathYesAbsolute path to the file
old_stringYesExact literal text to replace (include 3+ lines of context)
new_stringYesReplacement text
replace_allNoReplace all occurrences (default: false)

Requires confirmation (unless auto-edit or yolo).

glob

Finds files matching a glob pattern, sorted by modification time (most recent first).

ParameterRequiredDescription
patternYesGlob pattern (e.g. **/*.ts, src/**/*.tsx)
pathNoDirectory to search in (default: project root)

No confirmation required.

Searches file contents using ripgrep. Supports full regex syntax.

ParameterRequiredDescription
patternYesRegex pattern to search for
pathNoFile or directory to search in
globNoGlob filter for files (e.g. *.ts)
limitNoLimit output to first N lines

No confirmation required.

Last updated on