Skip to main content
Glama

read_chunk

Retrieve the exact source text for a chunk ID after search, validated against HEAD, with call-graph context and bound repo memories.

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. When the chunk's symbol has distilled decision records they attach as distilled_records (labeled unreviewed, capped at 2).

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?

No annotations provided, so the description carries full burden. It discloses that the chunk is validated against HEAD (relocating or flagging stale/gone), includes call-graph context and bound repo memories, and that distilled records are attached. This goes beyond a simple read and adds valuable behavioral context.

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 sentences with no filler. The core action is front-loaded, and every sentence adds value.

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?

For a read tool with 5 parameters and no output schema, the description covers the primary purpose, validation, and return of distilled records. It lacks details on graph_limit and worktree, but the overall context is sufficient for most uses given sibling tool variety.

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%, so description must compensate. It mentions 'one chunk id' (chunk_id) and 'include' for memories, and 'compact call-graph context' hints at include_graph. However, it does not explain graph_limit or worktree, leaving gaps beyond schema descriptions.

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 specifies the exact verb 'Read' and resource 'source text for one chunk id', and distinguishes from siblings like memory_search or symbol_lookup by emphasizing validation against HEAD and compact call-graph context.

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?

It states 'Use to read exact text after a search returns a chunk_id', giving a clear usage context. It does not explicitly mention when not to use or list alternatives, but the context is sufficient.

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