ingest_diff
Convert a git diff into a structured change summary with intent classification, files changed, symbols modified, and line delta for architectural insight.
Instructions
Ingest a code diff/patch into the context memory.
Converts a unified diff (git diff output) into a structured change summary: intent classification (bug-fix/feature/refactor), symbols changed, files modified, and line delta. Particularly useful for understanding recent changes and their architectural impact.
Args: diff_text: Raw unified diff text (git diff output). source: Identifier (e.g., 'pr_42_auth_refactor.diff'). commit_message: Optional commit message for better intent classification.
Returns JSON with ingestion result plus: - intent: bug-fix/feature/refactor/test/security/performance - files_changed, added_lines, removed_lines - symbols_changed: functions/classes modified
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": {
"diff_text": "<diff_text>",
"source": "<source>"
},
"name": "ingest_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| diff_text | Yes | ||
| commit_message | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |