Skip to main content
Glama
ESPChong

context-retrieval

by ESPChong

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CONTEXT_RETRIEVAL_DATA_DIRNoWhere index.faiss / vectors.npy / meta.json persist~/.context_retrieval
CONTEXT_RETRIEVAL_CHUNK_SIZENoLangChain splitter parameters1000
CONTEXT_RETRIEVAL_IVF_NPROBENoIVF clusters probed per query16
CONTEXT_RETRIEVAL_EMBED_MODELNoLocal fastembed model (384-dim)BAAI/bge-small-en-v1.5
CONTEXT_RETRIEVAL_ALLOWED_ROOTSNoComma-separated directory allow-list for tool paths
CONTEXT_RETRIEVAL_CHUNK_OVERLAPNoLangChain splitter parameters150
CONTEXT_RETRIEVAL_IVF_THRESHOLDNoVectors above this switch Flat → IVF index256

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
extract_document_textA

Extract structured text from a PDF, page by page (PyMuPDF). Returns JSON: page count, document metadata, and each page's text with 1-based page numbers — use pages='1-3' or '1,5' to limit output.

extract_document_imagesA

Extract embedded images from a PDF as base64 PNG (PyMuPDF). Each image carries page, width, height and byte size. Set include_data=false to inventory images without transferring payloads; oversized images return metadata only.

extract_document_tablesA

Extract tabular data from a PDF (Camelot lattice/stream with a PyMuPDF fallback; flavor='auto' picks the first strategy that finds tables). Returns JSON with rows, columns and CSV per table.

index_documentA

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).

search_contextA

Semantic search over indexed documents (FAISS + local embeddings). Returns the top-k chunks ranked by cosine similarity with source file and page provenance — feed these to your answer generation. Optional source_filter narrows hits to one document.

index_infoA

Report vector store status: documents, chunk count, dimension, FAISS index type.

reset_indexA

Drop every indexed document and clear the persisted vector store.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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