Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
VECGREP_MODELNoHuggingFace model ID for local providerisuruwijesiri/all-MiniLM-L6-v2-code-search-512
VECGREP_BACKENDNoLocal backend: onnx (fastembed) or torch (sentence-transformers)onnx
VECGREP_GEMINI_KEYNoAPI key for Google Gemini embeddings
VECGREP_OPENAI_KEYNoAPI key for OpenAI embeddings
VECGREP_VOYAGE_KEYNoAPI key for Voyage AI embeddings

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
index_codebaseA
Index a codebase directory for semantic search.

Walks the directory, extracts semantic code chunks using AST analysis,
embeds them locally with sentence-transformers, and stores in a vector index.
Subsequent calls skip unchanged files (incremental updates).

Args:
    path: Absolute path to the codebase root directory.
    force: If True, re-index all files even if unchanged.
    watch: If True, start a background watcher for live sync on file changes.
           Not supported with cloud providers (openai, voyage, gemini).
    provider: Embedding provider to use. One of: 'local' (default), 'openai',
              'voyage', 'gemini'. Cloud providers require the corresponding
              env var (VECGREP_OPENAI_KEY, VECGREP_VOYAGE_KEY, VECGREP_GEMINI_KEY)
              and optional dependency (pip install 'vecgrep[openai]' etc.).
              Once set, switching providers requires force=True to rebuild the index.

Returns:
    Summary: files indexed, chunks added, files skipped.
search_codeA
Semantically search an indexed codebase for code relevant to a query.

Embeds the query and performs cosine similarity search against indexed
code chunks, returning the most semantically relevant snippets with
file paths and line numbers.

If the codebase is not yet indexed, it will be indexed automatically first.

Args:
    query: Natural language description of what you're looking for.
           E.g. "how does authentication work", "database connection setup"
    path: Absolute path to the codebase root directory.
    top_k: Number of results to return (default 8, max 20).
    min_score: Minimum cosine similarity score to include a result (default 0.35).
               Results below this threshold are filtered out as noise. Set to 0.0
               to disable filtering.

Returns:
    Formatted list of matching code chunks with file:line references and
    similarity scores.
get_index_statusA
Get the status of the vector index for a codebase.

Args:
    path: Absolute path to the codebase root directory.

Returns:
    Index statistics: file count, chunk count, last indexed time, disk usage.
stop_watchingC

Stop watching a codebase for file changes.

index_graphA
Build (or rebuild) a knowledge graph for a codebase.

Walks the directory using the same skip rules as index_codebase, extracts
structural nodes (files, functions, classes) and edges (contains, calls,
imports, inherits) using tree-sitter, and persists the graph to disk.

This is independent of the vector index — you can run index_graph before
or after index_codebase.

Args:
    path: Absolute path to the codebase root directory.
    force: If True, rebuild the graph even if one already exists.

Returns:
    Summary: node count, edge count, files processed.
search_graphA
Search the knowledge graph for nodes matching a query.

Performs keyword matching over node labels (function names, class names,
file names) and returns the most relevant structural nodes with their
source locations and relationship degree.

The codebase graph must be built first with index_graph.

Args:
    query: Keywords to search for (e.g. "VectorStore", "auth login").
    path: Absolute path to the codebase root directory.
    limit: Maximum number of results to return (default 20).

Returns:
    Matching nodes with kind, source location, and connectivity degree.
graph_neighborsA
Return structural neighbors of a graph node.

Shows which functions call this node, which it calls, what it imports,
what it contains, and what it inherits from — up to *depth* hops away.

Use search_graph first to find the exact node ID.

Args:
    node_id: Node ID or label substring (e.g. "vectorstore_search" or "search").
    path: Absolute path to the codebase root directory.
    depth: Number of hops to traverse (1 = direct edges only, default 1).

Returns:
    Categorised list of neighboring nodes with their source locations.
hybrid_searchA
Semantic vector search re-ranked by knowledge graph proximity.

Combines vector similarity (cosine) with structural graph proximity
(BFS distance from query-matched graph nodes). The final score is:

    score = alpha * vector_score + (1 - alpha) * graph_score

Both vector and graph scores are normalised to [0, 1] before blending.
Requires both index_codebase and index_graph to have been run.

Args:
    query: Natural language description of what you're looking for.
    path: Absolute path to the codebase root directory.
    top_k: Number of results to return (default 8, max 20).
    alpha: Weight of vector score vs graph score (0.0 = graph only,
           1.0 = vector only, default 0.6).
    min_score: Minimum blended score threshold (default 0.0).

Returns:
    Formatted list of code chunks ranked by blended score.

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/VecGrep/vecgrep'

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