edit_file
Replaces the whole content of an existing file.
Replaces the whole content of an existing file.
- Tool name
- edit_file
- Group
- Files
- Risk
- medium
- Needs approval
- never
- Approval rule
- No approval. Hard blocks apply.
- Allowed in scheduled jobs
- No
- Default
- on
Parameters
| Name | Type | Required | Default | Meaning | Limits |
|---|---|---|---|---|---|
| path | string | Yes | Path relative to the project, such as vault/note.md. | ||
| content | string | Yes | The text to store or write. | Memory notes are read back into prompts in slices of 4,000 characters (global) or 1,500 (session). |
Returns
A confirmation.
Example (made up for this page)
{
"path": "demo",
"content": "demo"
}Updated vault/notes/a.mdSide effects
- Overwrites a file.
How it can fail
| When | What the agent sees |
|---|---|
| File does not exist | File does not exist: path |
| Protected path | HARD BLOCK |
See also:Files tools
Checked against the source at commit f4fd89f on 29 Oct 2026. Everything here is merged on the main branch; no release has been tagged yet. The source is private, so these pages are the public description.