Skip to main content
Glama

find_chunks_for_files

Locate diff chunks for files matching a glob pattern to analyze specific file types or directories without processing entire large diffs sequentially.

Instructions

Locate chunks containing files that match a specific glob pattern. Auto-loads the diff file if not already loaded. Essential for targeted analysis when you need to focus on specific file types, directories, or naming patterns (e.g., '.py' for Python files, 'test' for test files, 'src/' for source directory). Returns chunk numbers which you then examine using get_chunk. CRITICAL: You must use an absolute directory path - relative paths will fail. DO NOT attempt direct file reading. Use this for efficient navigation to relevant changes instead of processing entire large diffs sequentially.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
absolute_file_pathYesAbsolute path to the diff file
patternYesGlob pattern to match file paths (e.g., '*.py', '*test*', 'src/*')
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: auto-loading the diff file if not loaded, returning chunk numbers (not file contents), and the critical requirement for absolute paths. However, it doesn't mention error handling, performance characteristics, or rate limits, which would be helpful for a mutation/read operation.

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 appropriately sized and front-loaded with the core purpose. Every sentence adds value: the first states the main function, the second explains when to use it with examples, the third clarifies the output and next steps, and the fourth provides critical warnings. Minor redundancy exists in the pattern examples.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, behavioral traits, and parameter context. The main gap is the lack of output schema, so the description doesn't detail the return format beyond 'chunk numbers', but this is partially compensated by referencing get_chunk.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds some context by providing pattern examples ('*.py', '*test*', 'src/*') and emphasizing the absolute path requirement, but doesn't significantly expand beyond what the schema provides. Baseline 3 is appropriate when schema does the heavy lifting.

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's purpose with specific verbs ('locate chunks containing files', 'auto-loads the diff file') and resources ('files matching a glob pattern'). It distinguishes from sibling tools by specifying this is for targeted analysis rather than sequential processing or general listing, and explicitly mentions using get_chunk for examination.

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?

The description provides explicit guidance on when to use this tool ('essential for targeted analysis when you need to focus on specific file types, directories, or naming patterns') and when not to use it ('DO NOT attempt direct file reading', 'instead of processing entire large diffs sequentially'). It also references the alternative approach of using get_chunk for examination.

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