Skip to main content
Glama

Local RAG

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_PATHNoVector database storage location. Can grow large with many documents../lancedb/
BASE_DIRNoDocument root directory. Server only accesses files within this path (prevents accidental system file access)..
CACHE_DIRNoModel cache directory. After first download, model stays here for offline use../models/
CHUNK_SIZENoCharacters per chunk. Larger = more context but slower processing. Valid range: 128 - 2048.512
MODEL_NAMENoHuggingFace model identifier. Must be Transformers.js compatible.Xenova/all-MiniLM-L6-v2
CHUNK_OVERLAPNoOverlap between chunks. Preserves context across boundaries. Valid range: 0 - (CHUNK_SIZE/2).100
MAX_FILE_SIZENoMaximum file size in bytes. Larger files rejected to prevent memory issues. Valid range: 1MB - 500MB.104857600

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
query_documents

Search through previously ingested documents (PDF, DOCX, TXT, MD) using semantic search. Returns relevant passages from documents in the BASE_DIR. Documents must be ingested first using ingest_file.

ingest_file

Ingest a document file (PDF, DOCX, TXT, MD) into the vector database for semantic search. File path must be an absolute path. Supports re-ingestion to update existing documents.

list_files

List all ingested files in the vector database. Returns file paths and chunk counts for each document.

status

Get system status including total documents, total chunks, database size, and configuration information.

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/shinpr/mcp-local-rag'

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