Skip to main content
Glama

get_chunk

Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format: 'raw' (default, standard diff), 'annotated' (line numbers, new/old hunk separation), 'compact' (line numbers, new hunks only)raw
chunk_numberYesThe chunk number to retrieve (1-indexed)
include_contextNoInclude chunk header with metadata
absolute_file_pathYesAbsolute path to the diff file
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description adds that it auto-loads the diff file if not loaded and that it provides manageable portions. It correctly notes the absolute path requirement. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is somewhat lengthy but every sentence adds value: purpose, usage, critical requirement, behavioral note, and progress tracking advice. Well-structured but could be slightly more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description covers all essential aspects: what the tool does, when to use it, critical requirements (absolute path), behavioral traits (auto-loading, manageable portions), and guidance for comprehensive analysis. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter, so baseline is 3. The description adds the critical constraint that 'absolute_file_path' must be an absolute path, which is not in the schema. It also implies chunk_number is 1-indexed. Adds meaningful value beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves content of a specific chunk from a diff file. It distinguishes from siblings by mentioning it is for individual chunks identified via list_chunks or find_chunks_for_files, and explicitly warns against reading diff files directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear when-to-use scenarios: systematic chunk-by-chunk analysis or examining specific chunks. Includes a critical note about absolute paths and a 'DO NOT' instruction for reading diff files directly. Slightly less explicit about alternatives but gives good context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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