create_diff
Create a diff for an existing file, show changes to the user, and apply only after approval. Avoids direct writes, ensuring safe modifications.
Instructions
Use this instead of writing files directly. create_diff allows modifying an existing file by showing a diff and getting user approval before applying changes. Only use this tool on existing files. If a new file needs to be created, do not use this tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>",
"newContent": "<newContent>",
"targetProjectPath": "<targetProjectPath>"
},
"name": "create_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the existing file to modify | |
| newContent | Yes | Proposed new content for the file | |
| description | No | Description of the changes being made | |
| targetProjectPath | Yes | Path to the project folder we are working in |