Skip to main content
Glama
samishekhalard

rag-mcp

rag_read_around

Retrieve a full indexed chunk and its neighbouring chunks by ID after a search, so you can read surrounding context when a relevant passage is truncated.

Instructions

Read one indexed chunk in full, together with its neighbouring chunks.

Use this after rag_search when a passage is relevant but truncated and you need the surrounding text. chunk_id comes from rag_search output. context is how many chunks either side to include (0-5, default 1). This is an exact lookup by id, not another search, so it costs nothing to run.

Input Schema

NameRequiredDescriptionDefault
contextNo
chunk_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden itself and does well: it declares the operation is an exact id lookup, that it is cheap ("costs nothing to run"), and bounds the context parameter. It stops short of stating read-only semantics in annotation-like terms and says nothing about behavior on an unknown chunk_id (error vs. empty), which is the main remaining gap for a tool with zero annotation coverage.

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?

Four short sentences, front-loaded with the core action, then the usage trigger, then parameter meaning, then a cost reassurance. Each sentence adds distinct information; nothing is restated from the name or schema.

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?

An output schema exists, so return values need not be explained, and the description covers purpose, trigger, and both parameters. The only missing piece is failure behavior for an invalid or stale chunk_id, which matters given the id is obtained from a prior call.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does for both parameters: chunk_id's provenance is named (rag_search output) and context is defined semantically with its range and default ("how many chunks either side to include (0-5, default 1)"). The 0-5 bound is the kind of constraint the bare schema does not express.

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?

Specific verb and resource: "Read one indexed chunk in full, together with its neighbouring chunks." It also explicitly positions itself against rag_search ("This is an exact lookup by id, not another search"), so an agent can distinguish it from all four siblings without opening a schema.

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?

Gives an explicit trigger ("Use this after rag_search when a passage is relevant but truncated") and names the source of the required id ("chunk_id comes from rag_search output"). It also states the inverse (not a search), which is the exact confusion an agent would otherwise have with rag_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.