Skip to main content
Glama
avaazquezz

Qdrant RAG Build

by avaazquezz

expand_context

Read-only

Retrieve adjacent chunks before and after a specified chunk within the same document to restore continuity when a referenced snippet appears cut off.

Instructions

Fetches the chunks immediately before and after a given result within the same document, for continuity. Use this when get_context's answer references a chunk that seems to be cut off mid-thought.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
windowNo
collectionYes
chunk_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chunksYes
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to establish that this is a safe read operation. The description adds useful behavioral context about fetching neighboring chunks within the same document, but it does not disclose output shape, boundary behavior, or what happens for invalid chunk indexes.

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 two sentences with no filler: the first sentence states what the tool does, and the second explains when to use it. It is front-loaded and every word contributes.

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?

The description is adequate for a simple, read-only tool with an output schema and annotations, but it relies on the agent inferring parameter meaning from names. The missing documentation of 'window' and of how chunk_index is sourced from get_context leaves a noticeable gap.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, but it only indirectly covers doc_id/collection through 'same document' and chunk_index via 'given result.' The window parameter, which controls how many chunks are fetched, is never explained, and collection/chunk_index formats are left undefined.

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 uses a specific verb and resource: 'Fetches the chunks immediately before and after a given result within the same document, for continuity.' It also distinguishes the tool from get_context by naming it and describing the exact situation it addresses, so an agent can tell them apart.

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 gives an explicit trigger condition: 'Use this when get_context's answer references a chunk that seems to be cut off mid-thought.' This is clear context, but it does not state when not to use the tool or list other alternatives beyond get_context.

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/avaazquezz/RAG-Build'

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