Skip to main content
Glama

get_chunk

Extract specific numbered chunks from diff files for systematic analysis of changes, enabling manageable examination of large diffs without exceeding context limits.

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

TableJSON Schema
NameRequiredDescriptionDefault
absolute_file_pathYesAbsolute path to the diff file
chunk_numberYesThe chunk number to retrieve (1-indexed)
include_contextNoInclude chunk header with metadata

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peteretelej/diffchunk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server