Quick Start
How It Works
File editing operations use workspace containment for security:| Operation | Risk Level | Workspace Required | Purpose |
|---|---|---|---|
| search_files | Low | No | Find patterns in files |
| read_file | Low | No | Read file contents |
| list_files | Low | No | Directory listings |
| edit_file | High | Recommended | Modify file contents |
| write_file | High | Recommended | Create/overwrite files |
Configuration Options
File Editing Functions
| Function | Args | Description |
|---|---|---|
edit_file | filepath, old_string, new_string, replace_all=False | Fuzzy find-and-replace in file |
search_files | directory, pattern, file_pattern="*" | Search for text patterns |
read_file | filepath | Read file contents |
write_file | filepath, content | Write/overwrite file |
list_files | directory | List directory contents |
Search Parameters
Edit Options
Workspace Integration
Common Patterns
Code Refactoring
Configuration Updates
Bulk Content Changes
Best Practices
Search Before Edit
Search Before Edit
Always use
search_files to locate patterns before making edits. This provides visibility into the scope of changes and prevents unexpected modifications.Workspace Security
Workspace Security
File editing operations respect workspace boundaries. Destructive operations (
edit_file, write_file) require proper workspace configuration for security.Verification Workflow
Verification Workflow
After making edits, use
read_file to verify changes were applied correctly. This catches encoding issues or unexpected results.Atomic Operations
Atomic Operations
Edit operations are atomic - they either succeed completely or leave the original file unchanged. This prevents file corruption from partial writes.
Related
Workspace
How workspace containment secures file operations
Bot Default Tools
File tools included in default bot toolsets

