apply_diff_edit
Core
Security Level: Controlled Change
Description
Applies diff or patch changes to a text in a targeted way. The tool is designed for controlled, traceable edit operations and returns feedback on applied and failed hunks.
Example Usage
Your command could look like this:
- "Apply this diff to update the configuration file"
JSON Parameters (typical)
{
"tool": "apply_diff_edit",
"params": {
"original_text": "line1\nline2\nline3",
"diff_text": "@@ -1,3 +1,3 @@\n line1\n-line2\n+line2_new\n line3",
"mode": "unified"
}
}
Note: The exact parameter shape may vary slightly depending on the client/dispatcher.
Return Values
- success
1 if the diff was applied successfully. - updated_text
Resulting text after the patch is applied. - applied_hunks
Number of hunks that were applied successfully. - failed_hunks
Number of hunks that could not be applied. - message
Status or error message.
Related Tools
Ready to Try apply_diff_edit?
Download SindByte for free and use this tool with natural-language commands.
Download Now for FreeWindows 10/11 * No registration required * 100% local & private