get_chunk
Retrieve a specific numbered chunk from a diff file to analyze changes chunk-by-chunk. Auto-loads the diff if needed.
Instructions
Retrieve the actual content of a specific numbered chunk from a diff file. Auto-loads the diff file if not already loaded. Use this for systematic analysis of changes chunk-by-chunk, or to examine specific chunks identified via list_chunks or find_chunks_for_files. CRITICAL: You must use an absolute directory path - relative paths will fail. DO NOT read diff files directly - they exceed LLM context windows. This tool provides manageable portions of large diffs. Track your progress through chunks when doing comprehensive analysis and clean up tracking documents before final results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format: 'raw' (default, standard diff), 'annotated' (line numbers, new/old hunk separation), 'compact' (line numbers, new hunks only) | raw |
| chunk_number | Yes | The chunk number to retrieve (1-indexed) | |
| include_context | No | Include chunk header with metadata | |
| absolute_file_path | Yes | Absolute path to the diff file |