fs read
Read the contents of a file.- path — relative path from your project root
- offset — optional; 1-indexed line number to start reading from
- limit — optional; maximum number of lines to return (default
2000)
fs write
Create or overwrite a file.- path — relative path from your project root
- content — full file content
edit
Edit a file using exact text-match find/replace.replaceAll:
- path — relative path from your project root
- old — exact text to find in the file
- new — replacement text
- replaceAll — optional boolean; replace all occurrences instead of requiring uniqueness
<old> content must match the file exactly. Read the file first, then apply the edit.
File edits require your approval. You’ll see a diff preview before any changes are applied.
fs tree
List directory structure.- Respects
.gitignoreby default - Useful for quickly understanding project layout
fs search
Search file contents with regex.- pattern — regex pattern to search for
- path — optional directory to scope the search
- glob — optional file filter (e.g.
"*.ts") - limit — optional maximum number of matches (default
50)
fs view
Read an image file for visual inspection.- path — relative path to the image file
- Supports PNG, JPEG, WebP, GIF, and SVG
- Returns the image as visual output — useful for inspecting screenshots, diagrams, or design assets