Skip to content

EditRequest

Request for editing a file with one or more operations. Supports find/replace, line-range edits, insertions, and deletions. Designed for AI agents that need to modify files programmatically.

Kind: an object, used in requests.

FieldTypeRequiredDescription
pathstringPath to the file within the file system.
operationsEditOperation[]List of edit operations to apply, in order.
{
"path": "...",
"operations": [
{
"type": "...",
"find": "...",
"replace": "...",
"replaceAll": false,
"startLine": 0,
"endLine": 0,
"content": "...",
"insertAfterLine": 0,
"deleteLines": []
}
]
}