Skip to main content
Glama

read_chunk

Fetch and validate source text for a given chunk ID, including call-graph context and repo memories. Use after a search returns a chunk ID.

Instructions

Read the current source text for one chunk id, validated against HEAD (relocates or flags stale/gone), with compact call-graph context and bound repo memories. Use to read exact text after a search returns a chunk_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoWhat to include: `memories` (on by default). Pass `include: []` to suppress.
chunk_idYes
worktreeNoAbsolute path to a linked git worktree you're working in; serves that worktree's branch overlay over the indexed checkout. Omit (or pass an unrelated path) for the indexed checkout.
graph_limitNo
include_graphNocompact
Behavior4/5

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

The description discloses key behaviors: validation against HEAD, relocation/flagging of stale chunks, and inclusion of call-graph and memories. Since no annotations are provided, this description adequately informs the agent of the tool's effects.

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?

Two concise sentences with front-loaded verb and clear structure. No redundant information.

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 5 parameters, no annotations, and no output schema, the description covers purpose, usage context, and key behavior. It lacks details on return format and parameter relationships, but is sufficient for an agent familiar with the domain.

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 coverage is 40% (only 2 of 5 parameters have descriptions). The description adds context about chunk_id, call-graph, and memories, but does not explain specific parameters like graph_limit or include. It partially compensates for low schema coverage but could be more explicit.

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 reads source text for a chunk id, validated against HEAD, with call-graph and memories. It distinguishes itself from search tools by specifying 'after a search returns a chunk_id', which is different from sibling search or commit tools.

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?

The description explicitly says 'Use to read exact text after a search returns a chunk_id', giving clear context. However, it does not mention when not to use this tool or suggest alternatives among the many siblings.

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/cq27-dev/rag-rat'

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