Filesystem tools provide comprehensive file and directory operations. Tools are organized by operation type: navigation, read, search, and write.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lvndry/jazz/llms.txt
Use this file to discover all available pages before exploring further.
Tool organization
All filesystem tools are accessed through thefs namespace:
Navigation tools
pwd
Get the current working directory. Parameters: None Returns:Current working directory path
cd
Change the current working directory. Parameters:Target directory path (relative or absolute)
New working directory path
ls
List directory contents with filtering and recursion. Parameters:Directory path (defaults to current working directory)
Include hidden files (starting with
.)Recurse into subdirectories
Name filter. Supports:
- Substring match:
"test" - Regex:
"re:test.*\\.ts$"
Maximum results (cap: 2000)
Maximum depth for recursive listing
Full path to file or directory
File or directory name
Entry type
stat
Get file or directory metadata. Parameters:File or directory path
Entry type
Size in bytes
Last modified time (milliseconds since epoch)
Read tools
read_file
Read file contents with optional line range filtering. Parameters:File path to read
1-based start line (inclusive)
1-based end line (inclusive)
Maximum bytes to return (cap: 524288 = 512KB)
Text encoding
Resolved file path
File contents
Encoding used
Whether output was truncated
Total lines in file
Lines returned
Line range if specified:
head
Read first N lines of a file. Parameters:File path
Number of lines to read
tail
Read last N lines of a file. Parameters:File path
Number of lines to read
readPdf
Read PDF file contents. Parameters:PDF file path
Specific pages to extract (1-based)
Extracted text content
Total pages in PDF
pdfPageCount
Get total page count of a PDF file. Parameters:PDF file path
Total pages
Search tools
grep
Search file contents using text patterns or regex. Uses ripgrep when available, falls back to system grep. Parameters:Search pattern. Supports:
- Literal text:
"error" - Regex:
"re:error.*\\d+"
Path to search (defaults to current working directory)
Recurse into subdirectories
Treat pattern as regex
Case-insensitive matching
Maximum matches (cap: 2000)
File glob filter (e.g.,
"*.ts", "*.{js,jsx}")Exclude files matching pattern
Exclude directories matching pattern
Context lines above/below each match
Output format:
content: Show matching lines with line numbersfiles: Show only file pathscount: Show match counts per file
Search pattern used
Path searched
Backend used for search
Output mode used
Matches found (when
outputMode: 'content'):File paths (when
outputMode: 'files')Match counts (when
outputMode: 'count'):Total results found
find
Find files and directories by name, glob, or regex. Uses fast-glob by default, falls back to fd/find for advanced filters. Parameters:Start directory. Omit for smart hierarchical search (cwd → parents → home)
Name filter. Supports:
- Substring:
"test" - Glob:
"*.ts","**/*.test.ts" - Regex:
"re:test.*\\.ts$"
Type filter
Maximum depth (0 = current directory only)
Minimum depth (triggers fd/find backend)
Maximum results (cap: 2000)
Include hidden files and directories
Smart hierarchical search. Disable when providing specific path
Full-path pattern (e.g.,
"**/test/**"). Triggers fd/find backendPaths to exclude. Triggers fd/find backend
Case-sensitive matching
Size filter (e.g.,
"+100M", "-1k"). Triggers fd/find backendModification time filter:
"-7": Last 7 days"+30": Older than 30 days
Full path
File or directory name
Entry type
Write tools
All write tools require user approval before execution.write_file
Write content to a file, creating it if needed. Parameters:File path (created if doesn’t exist)
Full file content (replaces existing content)
Text encoding
Create parent directories if missing
Written file path
Success message
Whether file was newly created
Unified diff showing changes
edit_file
Edit specific parts of a file using structured operations. Parameters:File path (must exist)
Edit operations to apply in order. Each operation is one of:
Text encoding
Edited file path
Descriptions of applied edits
Total edits applied
Original line count
New line count
Unified diff showing changes
FileNotFoundError: File doesn’t existFileReadError: File exists but can’t be readOutOfBoundsError: Line range out of boundsInsertOutOfBoundsError: Insert position out of boundsPatternNotFoundError: Pattern not found in fileInvalidPatternError: Malformed regex patternPatternTooComplexError: Pattern too complex for find-and-replaceRegexIterationLimitError: Regex matched too many times
mkdir
Create a directory. Parameters:Directory path to create
Create parent directories if needed
rm
Remove files or directories. Parameters:File or directory path to remove
Remove directories recursively
mv
Move or rename a file or directory. Parameters:Source path
Destination path
cp
Copy a file or directory. Parameters:Source path
Destination path
Copy directories recursively
Best practices
Use the right search tool
- grep: Search file contents for text or patterns
- find: Search for files by name, path, or metadata