Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

text-editor-tool changedagents-and-tools/tool-use/text-editor-tool

Nearest release: v2.1.308, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+13added
Lines−13removed
From line 274 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits9to this page, all time

The whole hunk

from line 274, old and new numbered
/
lines
from line 274
274274<Accordion title="Example view commands">
275275 Example for viewing a file:
276276 
277 ```json
277 ```text wrap
278278 {
279279 "type": "tool_use",
280280 "id": "toolu_01A09q90qw90lq917835lq9",
from line 288
288288 
289289 Example for viewing a directory:
290290 
291 ```json
291 ```text wrap
292292 {
293293 "type": "tool_use",
294294 "id": "toolu_02B19r91rw91mr917835mr9",
from line 313
313313* `new_str`: The new text to insert in place of the old text
314314 
315315<Accordion title="Example str_replace command">
316 ```json
316 ```text wrap
317317 {
318318 "type": "tool_use",
319319 "id": "toolu_01A09q90qw90lq917835lq9",
from line 339
339339* `file_text`: The content to write to the new file
340340 
341341<Accordion title="Example create command">
342 ```json
342 ```text
343343 {
344344 "type": "tool_use",
345345 "id": "toolu_01A09q90qw90lq917835lq9",
from line 365
365365* `insert_text`: The text to insert
366366 
367367<Accordion title="Example insert command">
368 ```json
368 ```text
369369 {
370370 "type": "tool_use",
371371 "id": "toolu_01A09q90qw90lq917835lq9",
from line 560
560560 
561561Claude uses the text editor tool first to view the file:
562562 
563```json Output
563```text Output
564564{
565565 "id": "msg_01XAbCDeFgHiJkLmNoPQrStU",
566566 "model": "claude-opus-5-5",
from line 1021
10211021 
10221022Claude identifies the syntax error and uses the `str_replace` command to fix it:
10231023 
1024```json Output
1024```text Output
10251025{
10261026 "id": "msg_01VwXyZAbCdEfGhIjKlMnO",
10271027 "model": "claude-opus-5-5",
from line 1461
14611461 
14621462Finally, Claude provides a complete explanation of the fix:
14631463 
1464````json Output
1464````text Output
14651465{
14661466 "id": "msg_01IjKlMnOpQrStUvWxYzAb",
14671467 "model": "claude-opus-5-5",
from line 2258
22582258 
22592259Here are some ideas for how to use the text editor tool in more convenient and powerful ways:
22602260 
2261* **Integrate with your development workflow:** Build the text editor tool into your development tools or IDE
2262* **Create a code review system:** Have Claude review your code and make improvements
2263* **Build a debugging assistant:** Create a system where Claude can help you diagnose and fix issues in your code
2264* **Implement file format conversion:** Let Claude help you convert files from one format to another
2265* **Automate documentation:** Set up workflows for Claude to automatically document your code
2261* **Integrate with your development workflow:** Build the text editor tool into your development tools or IDE.
2262* **Create a code review system:** Have Claude review your code and make improvements.
2263* **Build a debugging assistant:** Create a system where Claude can help you diagnose and fix issues in your code.
2264* **Implement file format conversion:** Let Claude help you convert files from one format to another.
2265* **Automate documentation:** Set up workflows for Claude to automatically document your code.
22662266 
22672267The text editor tool allows Claude to work directly with your code base, supporting workflows from debugging to automated documentation.
22682268 
Feedback