Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nearai/ironclaw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The file operations tools provide controlled access to the filesystem with path validation, sandboxing, and size limits. These tools operate on the local filesystem, not workspace memory (usememory_* tools for workspace operations).
Tools
read_file
Read a file from the local filesystem. Returns file content as text with support for partial reads. Input ParametersPath to the file to read
Line number to start reading from (1-indexed, optional)
Maximum number of lines to read (optional)
File content with line numbers formatted as
line_num│ contentTotal number of lines in the file
Number of lines returned in this response
Absolute path to the file that was read
- Maximum file size: 1MB
- For files larger than 1MB, use
offsetandlimitparameters for partial reads - Requires approval unless auto-approved
- Runs in container domain
write_file
Write content to a file on the local filesystem. Creates the file if it doesn’t exist, overwrites if it does. Parent directories are created automatically. Input ParametersPath to the file to write
Content to write to the file
Absolute path to the file that was written
Number of bytes written
Always true on successful write
- Maximum content size: 5MB
- Workspace files (HEARTBEAT.md, MEMORY.md, IDENTITY.md, SOUL.md, AGENTS.md, USER.md, README.md) are rejected
- Files in
daily/orcontext/directories are rejected - Parent directories created automatically
- Rate limited: 20 calls per minute, 200 per hour
InvalidParameters: Content exceeds 5MB or path is a workspace fileExecutionFailed: Failed to create directories or write file
list_dir
List contents of a directory on the local filesystem. Shows files and subdirectories with their sizes. Input ParametersPath to the directory to list (defaults to current directory)
If true, list contents recursively
Maximum depth for recursive listing
Absolute path to the directory that was listed
Array of entry strings. Directories end with
/, files show size in parenthesesNumber of entries returned
True if results were truncated (max 500 entries)
- Maximum 500 entries returned
- Common directories excluded during recursion:
node_modules,target,.git,__pycache__,venv,.venv - Entries sorted with directories first, then alphabetically
apply_patch
Apply targeted edits to a file using search/replace. Finds the exactold_string and replaces it with new_string. Use for surgical code changes without rewriting entire files.
The
old_string must match exactly, including whitespace and indentation.Path to the file to edit
The exact string to find and replace
The string to replace it with
If true, replace all occurrences. If false, replaces first occurrence only.
Absolute path to the file that was edited
Number of replacements made
Always true on successful patch
ExecutionFailed:old_stringnot found in file (check exact match including whitespace)ExecutionFailed: Failed to read or write file
- Must read file before editing
- Rate limited: 20 calls per minute, 200 per hour
- Requires approval unless auto-approved