generate_patch
Generate a validated unified diff for code changes. Specify files to modify, constraints, and test failures to guide patch creation.
Instructions
Generate a validated candidate unified diff; this tool never edits the repository.
Use deepseek-v4-pro for complex work and deepseek-v4-flash for routine changes. file_context should label each supplied file with its repository-relative path. allowed_paths is the exact list of files the returned patch may add, edit, or delete. On a repair round, send current file contents plus exact test/build failures.
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": {
"task": "<task>",
"file_context": "<file_context>",
"allowed_paths": "<allowed_paths>"
},
"name": "generate_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| model | No | deepseek-v4-pro | |
| constraints | No | ||
| file_context | Yes | ||
| allowed_paths | Yes | ||
| test_failures | No |