apply_patch
Use this tool to apply a patch file to a workspace, with options for dry runs, reverse application, path stripping, and file backups. Integrates with Code MCP Server for VS Code interactions.
Instructions
Apply a patch file to the workspace
Input Schema
Name | Required | Description | Default |
---|---|---|---|
backup | No | Create backup files | |
dryRun | No | Show what would be done without making changes | |
patchFile | Yes | Path to patch file | |
reverse | No | Apply patch in reverse | |
stripPaths | No | Number of path components to strip |
Input Schema (JSON Schema)
{
"properties": {
"backup": {
"description": "Create backup files",
"type": "boolean"
},
"dryRun": {
"description": "Show what would be done without making changes",
"type": "boolean"
},
"patchFile": {
"description": "Path to patch file",
"type": "string"
},
"reverse": {
"description": "Apply patch in reverse",
"type": "boolean"
},
"stripPaths": {
"description": "Number of path components to strip",
"type": "number"
}
},
"required": [
"patchFile"
],
"type": "object"
}