text_editor
View, create, and edit files with persistent state across command calls. Perform actions like string replacement, line insertion, and file editing using commands such as view
, create
, str_replace
, and insert
.
Instructions
View, create, and edit files with persistent state across command calls. This tool is identical with Claude's built in text editor tool called text_editor_20241022
Input Schema
Name | Required | Description | Default |
---|---|---|---|
command | Yes | The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`. | |
description | Yes | The reason you are using the text editor (max 80 chars) | |
file_text | No | Required parameter of `create` command, with the content of the file to be created. | |
insert_line | No | Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`. | |
new_str | No | Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert. | |
old_str | No | Required parameter of `str_replace` command containing the string in `path` to replace. | |
path | Yes | Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`. | |
view_range | No | Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file. |