Skip to main content
Glama
ekelly95

document-index-mcp

by ekelly95

Get Chunk Context

get_chunk_context

Fetch the full text of a chunk and up to five neighbors on each side in reading order. Specify via chunk_id or document_id with seq to obtain body text for context.

Instructions

Full text of one chunk plus up to 5 neighbours on each side in reading order. Address it by chunk_id (from search results) OR by document_id + seq (from outline spans). This is the only tool that returns body text and it is hard-capped at ~24k characters — walk seq windows to read progressively.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seqNo
afterNo
beforeNo
chunk_idNoFrom search_document results
document_idNoWith seq, from outline spans

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chunksYes
document_idYes
source_pathYesLibrary-relative path of the source file
document_titleYesTitle of the source document
has_more_afterYes
has_more_beforeYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the hard cap of ~24k characters, the neighbor window of up to 5 on each side, and the progressive reading strategy. This is valuable behavioral context beyond the schema, though it does not cover error cases or permission requirements.

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 dense sentences with no redundant words. The most important function is front-loaded, followed by quick addressing instructions and a practical cap warning. Perfectly sized.

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

Completeness5/5

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

Given the presence of an output schema (so return structure need not be detailed) and the tool's moderate complexity, the description covers all essentials: what it returns, how to address chunks, neighbor bounds, the character cap, and progressive reading advice. No critical gaps.

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 only 40%, but the description fills gaps by explaining the two addressing modes (chunk_id OR document_id+seq) and the neighbor limit, which maps to after/before parameters. It adds meaning beyond the bare schema, especially for uncovered params like seq and after/before.

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 returns 'Full text of one chunk plus up to 5 neighbours', which is a specific verb+resource+scope. It explicitly distinguishes itself from siblings by noting 'This is the only tool that returns body text', leaving no ambiguity about its unique role.

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?

Provides clear context for when to use it (when body text is needed) and how to address chunks via chunk_id or document_id+seq, with sources for those IDs. It also advises 'walk seq windows to read progressively' for large reads, though it does not explicitly state when not to use it or name alternatives beyond implying it's the only body-text tool.

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/ekelly95/document-index-mcp'

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