text_editor (Anthropic)
Tool : A precise action the AI can call · requires anthropic-api
View, create, and replace text in files, client-side.
The bash companion for clean file editing; confine it to the project folder.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
When asking Claude to fix or improve code, it usually responds with textual suggestions that you must apply yourself. The text_editor tool changes that: it lets Claude act directly on files, reading them, modifying them, and creating new ones, without manual intervention between each step.
Concretely, the tool exposes four commands that Claude can call via the API: view to read a file or list a directory, str_replace to replace a precise portion of text, create to create a new file with given content, and insert to add text at a specific line. Your application executes each command client-side and returns the result to Claude, which then chains the necessary actions.
This tool is aimed at developers building agents or coding assistants via the Anthropic API. Typical use cases include bug fixing, refactoring, adding documentation, and generating unit tests from existing code.
It is not suited for general public use without a dedicated interface: integration requires writing code to handle the call loop and results. Users looking for a ready-to-use coding assistant should look for environments that already integrate this tool.
What it offers
- ·Reading files or entire directories via the view command, with the option to target a specific line range.
- ·Surgical text replacement with str_replace, which requires an exact match including whitespace and indentation.
- ·Creating new files with full content via the create command.
- ·Inserting text at a precise line in an existing file using the insert command.
- ·max_characters parameter to truncate display of large files and control token consumption (available from version text_editor_20250728 onwards).
- ·Integration into multi-step flows: Claude automatically chains reading, analysis, and modification without manual intervention between calls.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- api
- Host
- anthropic-api
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data stays local
- Maintenance
- Active
Links and repository checked on 25 October 2026 · added on 1 January 2025
How to install text_editor (Anthropic)
tools=[{"type":"text_editor_20250728","name":"str_replace_based_edit_tool"}]