Skip to main content
Glama

get_chunk

Retrieve the indexed code chunk for a given file path and line number from a repository.

Instructions

Read the indexed chunk containing a repository-relative file path and one-based line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRepository-relative file path exactly as shown in a search result or list_files.
lineYesOne-based line number inside the desired chunk.
profileNoSaved profile to use for source defaults.
sourceNoGit URL or local path. Omit only when the server has a default source.
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as error handling (e.g., if chunk not found), whether the operation is destructive, or any rate limits. The word 'Read' implies idempotency, but beyond that, transparency is minimal.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no wasted words. It communicates the essential information efficiently.

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

Completeness3/5

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

Despite having 4 parameters and no output schema, the description is brief. It does not explain what a 'chunk' is, typical size, behavior when the line is out of range, or the structure of the return value. While adequate for a simple read tool, it leaves gaps for an agent to fully understand the tool's behavior.

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?

While the input schema already provides descriptions for all parameters, the tool description adds meaningful context: it specifies the file path must be 'exactly as shown in a search result or list_files' and clarifies the line number is 'one-based'. This additional detail helps the agent select and invoke the tool correctly.

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 action ('Read'), the resource ('indexed chunk'), and the required inputs ('repository-relative file path' and 'one-based line number'). It is specific and distinguishes this tool from siblings like search or list_files by focusing on reading a specific chunk.

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

Usage Guidelines3/5

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

The description implies usage when the user has a file path and line number from a search result, but it does not explicitly state when to use this tool versus alternatives like search or list_files. No guidance on when not to use or prerequisites.

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/tristanmanchester/sifs'

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