Skip to main content
Glama

load_diff

Read-only

Load a diff file with custom chunk sizes, context lines, and include/exclude patterns to navigate large diffs efficiently.

Instructions

Parse and load a diff file with custom chunking settings. Use this tool ONLY when you need non-default settings (custom chunk sizes, filtering patterns). Otherwise, use list_chunks, get_chunk, or find_chunks_for_files which auto-load with optimal defaults. CRITICAL: You must use an absolute directory path - relative paths will fail. The diff file will be too large for direct reading, so you MUST use diffchunk tools for navigation. When using tracking documents for analysis, remember to clean up tracking state before presenting final results. The response includes a files_excluded count showing how many files were removed by exclude_patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skip_trivialNoSkip whitespace-only changes
context_linesNoNumber of context lines around each change (default: keep all from diff file)
skip_generatedNoSkip generated files and build artifacts
max_chunk_linesNoMaximum lines per chunk
exclude_patternsNoComma-separated glob patterns for files to exclude
include_patternsNoComma-separated glob patterns for files to include
absolute_file_pathYesAbsolute path to the diff file to load
Behavior4/5

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

Annotations indicate readOnlyHint=true, consistent with description. Description adds behavioral context: absolute path, file size limitation, and need to clean tracking state. However, does not detail error handling or response content.

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?

Description is concise, front-loads purpose, and contains no redundant text. Slightly verbose with multiple sentences but still efficient.

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

Completeness4/5

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

Given 7 parameters well-described in schema and text, no output schema, the description provides sufficient context for usage, warnings, and behavioral notes. Missing some details on return values, but overall adequate.

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%, baseline 3. Description adds extra meaning for parameters (e.g., 'whitespace-only changes' for skip_trivial, 'build artifacts' for skip_generated, 'comma-separated glob patterns' for exclude/include), justifying higher score.

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?

Description clearly states verb (parse/load) and resource (diff file), and distinguishes from siblings by specifying it is for non-default chunking settings.

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

Usage Guidelines5/5

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

Explicitly says when to use (custom settings) and when not to (use siblings for defaults). Provides critical warnings: absolute path required, file too large, cleanup of tracking state.

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