Skip to main content
Glama
ESPChong

context-retrieval

by ESPChong

index_document

Index PDF files into a local RAG store, enabling immediate retrieval of document context through vector search.

Instructions

Index a PDF into the local RAG store: PyMuPDF text -> LangChain chunking -> local fastembed embeddings -> FAISS. Call once per document, then use search_context for queries. Re-indexing a changed file replaces its chunks (set replace=false to append).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replaceNo
pdf_pathYes
chunk_sizeNo
chunk_overlapNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden and does well: it discloses the full processing pipeline, persistent store mutation, and re-indexing replacement vs append semantics. Could mention failure behavior or side effects, but the core mutation behavior is transparent.

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?

Three dense sentences with no fluff. The pipeline is front-loaded, usage comes next, and the replace/append caveat is at the end. Every sentence earns its place.

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?

Covers the main workflow, post-index search routing, and the critical replace behavior. Given an output schema exists, return values need no explanation. Minor gaps remain around chunk_size and chunk_overlap semantics, but the description is largely sufficient for correct invocation.

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. It only explains 'replace' semantics; the pipe path is inferable from the name, but chunk_size and chunk_overlap receive no meaningful description beyond the vague 'LangChain chunking' reference.

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?

States a specific verb, resource, and pipeline ('Index a PDF into the local RAG store') and describes the transformation chain from PyMuPDF text to FAISS. Clearly distinguishes indexing from sibling tools like extract_document_text and search_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?

Provides clear usage context: call once per document, then search_context for queries, with replace/append behavior. Does not explicitly enumerate when to prefer extraction siblings, but the pipeline and search handoff make the intended workflow obvious.

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

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/ESPChong/context-retrieval-system-RAG-MCP'

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