Appearance
File Operations
Read, write, and edit local files.
| Tool | Extra | Description |
|---|---|---|
editor | base | View, search, and edit files line-by-line. |
file_read | base | Read and parse local files (JSON, PDF, CSV, code, and more). |
file_write | base | Create or overwrite files with agent output. |
editor
View, search, and edit files line-by-line.
python
from elsai_tools.editor import editor| Parameter | Type | Required | Description |
|---|---|---|---|
command | str | Yes | view, create, str_replace, insert, undo, pattern_replace, search |
path | str | Yes | File path |
file_text | str | No | Full file content (create) |
insert_line | Union[str, int] | No | Line number for insert |
new_str | str | No | Replacement or insert text |
old_str | str | No | Text to replace |
pattern | str | No | Regex pattern |
file_read
Read and parse local files (JSON, PDF, CSV, code, and more).
python
from elsai_tools.file_read import file_read| Parameter | Type | Required | Description |
|---|---|---|---|
path | str | Yes | File path or comma-separated paths |
mode | str | No | Read mode |
offset | int | No | Start line/byte offset |
limit | int | No | Max lines/bytes to read |
file_write
Create or overwrite files with agent output.
python
from elsai_tools.file_write import file_write| Parameter | Type | Required | Description |
|---|---|---|---|
path | str | Yes | Target file path |
content | str | Yes | File content |
append | bool | No | Append instead of overwrite |