mcp-local-rag
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-local-ragfind where the function parseJson is defined"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Local RAG
π΄ Forked from shinpr/mcp-local-rag β original work by Shinsuke Kagawa
Local code intelligence engine for AI coding assistants. AST-level semantic chunking + keyword boost for pinpointing functions, classes, and APIs β fully private, zero setup.
π δΈζζζ‘£
Table of Contents
4.1 Ingest Tools
4.2 Search Tools
4.3 Management Tools
4.5 System Tools
5.1 Basic Commands
Related MCP server: lynx-mcp
1. Features
Smart dual-strategy chunking β AST-level code chunking via tree-sitter (splits at function/class/method boundaries, injects scope chain + imports). Semantic chunking for documents (splits by meaning, not character count).
Semantic search + keyword boost β Vector search first, then keyword matching boosts exact terms.
useEffect, error codes, class names rank higher β not just semantically guessed.15 MCP tools β Ingest, search, manage, code intelligence, and system ops in one server.
AST code intelligence β
find_definitionandfind_referencesfor IDE-level code navigation, powered by tree-sitter metadata captured at ingest time.Three-tier mirror auto-fallback β
huggingface.co β hf-mirror.com β modelscope.cn, zero config for users in mainland China.Runs entirely locally β No API keys, no cloud, no data leaving your machine. Works offline after the first model download.
Zero-friction setup β One
npxcommand. No Docker, Python, or servers to manage.
2. Quick Start
Set BASE_DIR to the folder you want to search (BASE_DIRS for multiple roots β see Configuration).
2.1 Configure Your AI Coding Tool
Cursor β ~/.cursor/mcp.json:
{
"mcpServers": {
"local-rag": {
"command": "npx",
"args": ["-y", "@damoqiongqiu/mcp-local-rag"],
"env": { "BASE_DIR": "/path/to/your/project" }
}
}
}Claude Code:
claude mcp add local-rag --scope user --env BASE_DIR=/path/to/your/project -- npx -y @damoqiongqiu/mcp-local-ragCodex β ~/.codex/config.toml:
[mcp_servers.local-rag]
command = "npx"
args = ["-y", "@damoqiongqiu/mcp-local-rag"]
[mcp_servers.local-rag.env]
BASE_DIR = "/path/to/your/project"WorkBuddy β Settings β Custom Connectors β Add:
{
"mcpServers": {
"local-rag": {
"command": "npx",
"args": ["-y", "@damoqiongqiu/mcp-local-rag"],
"env": { "BASE_DIR": "/path/to/your/project" }
}
}
}β οΈ WorkBuddy: you MUST click "Trust" in the Custom Connectors list after adding, otherwise the server is silently blocked.
2.2 CLI Quick Start
No MCP needed β run directly from the terminal:
npx @damoqiongqiu/mcp-local-rag ingest ./src/
npx @damoqiongqiu/mcp-local-rag query "auth middleware"
npx @damoqiongqiu/mcp-local-rag statusThat's it. No Docker, Python, or server setup.
2.3 First-Time Project Indexing
You: "Index the src directory of this project"
Assistant: Successfully ingested 156 files (2,847 chunks created)
You: "Where's the middleware that handles API rate limiting?"
Assistant: src/middleware/rateLimiter.ts β useRateLimiter(), lines 42β89
You: "How is the database connection pool configured?"
Assistant: src/config/database.ts β createPool() default max: 20, idle: 53. Core Concepts
3.1 Dual-Strategy Chunking
Chunking strategy is chosen per file type:
Code files (50+ languages) β
CodeChunkerparses source via tree-sitter AST, splits at structural boundaries (functions, classes, methods). Each chunk'scontextualizedTextincludes its scope chain and import context for precise semantic search.Documents (PDF/DOCX/TXT/MD/HTML) β
SemanticChunkersplits into sentences, groups by embedding similarity to find natural topic boundaries. Markdown code blocks remain intact β never split mid-block.
3.2 Hybrid Search
Search = semantic similarity + keyword boost (RAG_HYBRID_WEIGHT, default 0.6):
Query vectorization β semantic search finds most relevant chunks
Quality filters apply (distance threshold, grouping)
Keyword matching boosts exact-term rankings
Exact identifiers like useEffect are never buried by semantic approximations.
3.3 Security Boundary
Only files under BASE_DIR / BASE_DIRS are accessible for ingest, list, delete, or read-neighbor operations. Symlinks resolved outside roots are rejected. Sibling-prefix paths (e.g., /foo/barista when root is /foo/bar) are also blocked β prevents path traversal attacks.
4. MCP Tool Reference
15 tools organized into 5 categories.
4.1 Ingest Tools
# | Tool | Purpose | Example |
1 |
| Single file (PDF/DOCX/TXT/MD/code) |
|
2 |
| In-memory text/HTML |
|
3 |
| Bulk directory ingest |
|
ingest_file supports 50+ code languages. PDFs support an optional visual mode β a local VLM generates captions for figure pages, making visual content searchable. Two profiles available:
Profile | Model | Cache | Suited for |
| SmolVLM-256M | ~250 MB | Light visual indexing |
| Qwen2.5-VL-3B-ONNX | ~2.9 GB | Figures with in-image text |
# CLI
npx @damoqiongqiu/mcp-local-rag ingest ./spec.pdf --visual --visual-quality quality
# MCP
"Ingest ./spec.pdf with visual: true, visualQuality: 'quality'"ingest_data runs Readability β Markdown β index. Perfect for web content fetched by your AI assistant. Re-ingesting replaces old versions automatically.
ingest_directory scans recursively, respects .gitignore, shows real-time progress via MCP notifications.
4.2 Search Tools
# | Tool | Purpose | Key Parameters |
4 |
| Hybrid search (semantic + keyword) |
|
5 |
| Expand context around results |
|
query_documents β scope accepts a single path prefix or list, restricting results to that subtree. highlightContext returns snippets around matched terms. fromTimestamp / untilTimestamp enable time-range filtering.
read_chunk_neighbors β defaults to 2 chunks before and after (like grep -C 2), max 50 each. Response includes the target chunk marked isTarget: true.
4.3 Management Tools
# | Tool | Purpose |
6 |
| List files with ingestion status ( |
7 |
| Delete by file path or source URL |
8 |
| Index stats: docs, chunks, memory, search mode |
list_files supports scope filtering with the same prefix-match semantics as search. In large directories, scope accelerates the scan by skipping out-of-scope subtrees.
4.4 Code Intelligence
# | Tool | Purpose | Input |
9 |
| Locate symbol definition (file, line range, scope) | Exact symbol name |
10 |
| Find all references (import + text mention) | Symbol name |
Both tools depend on AST metadata (imports, entities, scope chains) extracted by tree-sitter at ingest time. Only works for code files ingested with CodeChunker β files ingested before v0.18.7 lack this metadata and require reindex_all to rebuild.
find_references uses a two-phase strategy: (1) exact match in codeMeta.imports β (2) FTS full-text search for the symbol name. Results are deduplicated by (filePath, chunkIndex), with import references listed first.
4.5 System Tools
# | Tool | Purpose |
11 |
| Runtime hot read/write config β no restart needed |
12 |
| SHA256 + Jaccard similarity to detect duplicate files |
13 |
| Export entire index as JSON (backup or migration) |
14 |
| Full re-chunk + re-embed (after model change) |
15 |
| Re-ingest only files modified on disk (incremental sync) |
config hot-swaps hybridWeight, modelName, cacheDir, baseDir/baseDirs, etc. Switching models auto-disposes the old Embedder and initializes the new one β note: changing models alters the embedding space and requires reindex_all.
dedup_check is especially useful in monorepos β spot β futures mirror code is typically flagged with similarity 1.0.
5. CLI
5.1 Basic Commands
# Ingest
npx @damoqiongqiu/mcp-local-rag ingest ./src/
# Search (with scope)
npx @damoqiongqiu/mcp-local-rag query "auth middleware"
npx @damoqiongqiu/mcp-local-rag query "auth" --scope /docs/api
# Context expansion
npx @damoqiongqiu/mcp-local-rag read-neighbors --file-path /abs/path.md --chunk-index 5
# Management
npx @damoqiongqiu/mcp-local-rag list --scope /docs/api
npx @damoqiongqiu/mcp-local-rag status
npx @damoqiongqiu/mcp-local-rag delete ./docs/old.pdf
npx @damoqiongqiu/mcp-local-rag delete --source "https://..."query, read-neighbors, list, status, delete emit JSON to stdout (pipe to jq). ingest emits progress to stderr.
Global options (--db-path, --cache-dir, --model-name) go before the subcommand:
npx @damoqiongqiu/mcp-local-rag --helpβ οΈ The CLI does NOT read your MCP client config (
mcp.json, etc.). Configure via flags or environment variables.
5.2 CLI Configuration
Flags β global options before, subcommand options after:
npx @damoqiongqiu/mcp-local-rag --db-path ./my-db query "auth" --base-dir ./docs--base-dir is repeatable on ingest and list:
npx @damoqiongqiu/mcp-local-rag ingest --base-dir ./docs --base-dir ./specs ./docs/readme.mdEnvironment variables:
export DB_PATH=./my-db
export BASE_DIR=./docs
npx @damoqiongqiu/mcp-local-rag query "auth"For multiple roots, use BASE_DIRS (JSON array):
export BASE_DIRS='["/Users/me/work","/Users/me/specs"]'Precedence: CLI flags > environment variables > defaults.
6. Network & Models
6.1 Mirror Auto-Detection
huggingface.co is inaccessible from mainland China. Built-in three-tier mirror chain with automatic fallback:
huggingface.co β hf-mirror.com β modelscope.cnAt startup, each mirror is HEAD-probed (3s timeout). The first reachable mirror with a complete API is selected:
With proxy (
HTTPS_PROXY) β direct to huggingface.coNo proxy β auto-switch to hf-mirror.com
hf-mirror API unavailable β fallback to modelscope.cn
No manual HF_ENDPOINT required. For manual control:
Env Var | Effect |
| Disable auto-detection, use huggingface.co only |
| Force a specific mirror, skip auto-detection |
v0.18.5+ uses
setGlobalDispatcher(ProxyAgent)β all Node.js 22 network requests go through the proxy.
6.2 Model Selection
6 embedding models with alias resolution via model-registry:
Model | Alias | Size | Dims |
|
| ~90 MB | 384 |
| β | ~120 MB | 384 |
|
| ~130 MB | 384 |
|
| ~420 MB | 768 |
| β | ~420 MB | 768 |
|
| ~420 MB | 768 |
Guidance: code repos β default model + high keyword boost; multilingual β consider embeddinggemma-300m; scientific papers β consider allenai-specter.
RAG_DTYPE controls ONNX precision (fp32 / fp16 / q8). Default fp32; use q8 when memory-constrained. β οΈ Changing models or dtype requires deleting DB_PATH and re-indexing.
6.3 File Watching
Set RAG_WATCH=true β the server starts recursive fs.watch on baseDirs (500ms debounce):
File creation/modification β auto
ingest_fileFile deletion β auto
delete_file
Ideal for actively changing projects.
7. Search Tuning
Variable | Default | Description |
|
| Keyword boost: 0 = semantic only, 1 = keyword only |
| unset |
|
| unset | Filter low-relevance results (e.g., |
| unset | Limit results to top N files |
Code-focused tuning (recommended default):
{ "RAG_HYBRID_WEIGHT": "0.7", "RAG_GROUPING": "similar" }Document-focused tuning:
{ "RAG_HYBRID_WEIGHT": "0.4", "RAG_GROUPING": "related" }Keyword boost is applied after semantic filtering β improves precision without introducing noise.
8. Performance Tuning
Beyond search accuracy, inference performance is also configurable. All optimizations are environment variables β no code changes required.
8.1 Quantization Precision (RAG_DTYPE)
Controls ONNX model inference precision. For all-MiniLM-L6-v2, three levels are available:
Value | Model Size | Speed | Memory | Precision Loss | Best For |
| ~90 MB | baseline | ~80 MB | none | First use, maximum accuracy |
| ~45 MB | 20-30% faster | ~45 MB | negligible | Recommended for daily use |
| ~45 MB | 30-50% faster | ~45 MB | minor | Low memory, large projects |
"env": { "RAG_DTYPE": "fp16", "BASE_DIR": "..." }β οΈ Changing dtype requires index rebuild β embedding spaces are incompatible.
Verify it works: After restart, call status via MCP and check the dtype field. Should match your setting (e.g., "fp16").
If it fails: Startup throws EmbeddingError with a list of supported dtypes. Common cause: the model doesn't provide the q8 variant β switch to fp16.
8.2 Execution Device (RAG_DEVICE)
Controls which ONNX Runtime backend to use:
Value | Backend | Notes |
| CPU | Most stable, no extra dependencies |
| GPU (WebGPU) | β οΈ Experimental: M1/M2 Mac uses Metal, NVIDIA uses Vulkan |
"env": { "RAG_DEVICE": "webgpu", "RAG_DTYPE": "fp16", "BASE_DIR": "..." }β οΈ Changing device changes the embedding space β requires index rebuild. Stacks with RAG_DTYPE β fp16 + webgpu gives both model-size reduction and GPU speedup.
Verify it works: MCP startup log should show Loading model on device "webgpu". status should show device: "webgpu".
If it fails:
Unsupported deviceat startup β WebGPU unavailable in your environment, revert to"cpu"Starts successfully but inference crashes β likely an ONNX WebGPU backend bug, revert to
"cpu"Just delete the
RAG_DEVICEline to fall back β other config is untouched
8.3 Minimum Chunk Length (CHUNK_MIN_LENGTH)
Filters out chunks shorter than this value during ingest. Default 50 keeps nearly everything; 200 drops 30-40% of noise fragments.
"env": { "CHUNK_MIN_LENGTH": "200", "BASE_DIR": "..." }β οΈ Blunt instrument β short but important code (e.g., config constants) may also be discarded. Requires index rebuild. Sweet spot: 100-200.
8.4 Recommended Configurations
Scenario | Config |
Daily development |
|
Large project + M1/M2 Mac |
|
Memory-constrained |
|
All changes require reindex_all (MCP) or re-running ingest (CLI). If something breaks, delete the failing env line to revert to defaults.
9. Configuration Reference
MCP server: environment variables only (via your MCP client's env block).
CLI: environment variables + equivalent flags (flags take precedence).
Env Var | CLI Flag | Default | Description |
|
|
| Document root (security boundary) |
| β | unset | JSON array of roots, overrides |
|
|
| Vector database path |
|
|
| Model cache β recommend absolute path |
|
|
| HuggingFace model ID |
|
| 100 MB | Max file size in bytes |
|
|
| Min chunk length (1β10000 chars) |
| β |
| ONNX execution device |
| β |
| Quantization ( |
| β | unset | Model download proxy. v0.18.5+ globally effective |
| β |
| Manual mirror override |
| β |
| Auto-detection toggle |
| β | unset | File watching ( |
Root resolution order: CLI --base-dir > BASE_DIRS > BASE_DIR > cwd. BASE_DIRS and BASE_DIR are never merged. Only JSON array syntax supported for BASE_DIRS β delimiter syntax is intentionally rejected.
10. Troubleshooting
Symptoms: fetch failed, status shows searchMode: fts instead of hybrid.
Solutions:
Network restriction (mainland China, etc.) β use proxy:
"env": { "HTTPS_PROXY": "http://127.0.0.1:7890" }Set in your MCP client config, not the terminal. v0.18.5+ globally effective via
setGlobalDispatcher.Auto-mirror fallback (v0.18.2+, default) β three-tier probe. Usually works without any config.
Manual override β
HF_ENDPOINT=https://modelscope.cnor download models manually intoCACHE_DIR.npx cached old version β clear and restart:
rm -rf ~/.npm/_npx/
Verify config file syntax
WorkBuddy users: confirm "Trust" button clicked
Restart client completely (Cmd+Q on macOS)
Test directly:
npx @damoqiongqiu/mcp-local-ragshould run without errors
After switching models or when the database is corrupted:
Stop the MCP service
Delete
DB_PATHdirectory (default./lancedb/) β safe, doesn't affect source filesRestart MCP β fresh database auto-created
Bulk re-ingest:
npx @damoqiongqiu/mcp-local-rag ingest ./src/
Private? Yes. After model download, nothing leaves your machine.
Offline? Yes, once models are cached.
Supported formats? 50+ code languages + PDF/DOCX/TXT/MD/HTML. No Excel, PPT, or images.
GPU acceleration? Opt-in via
RAG_DEVICE. Support depends on your system, Node.js version, and the ONNX backend.Backup? Copy the
DB_PATHdirectory.
11. Development
git clone https://github.com/damoqiongqiu/mcp-local-rag.git
cd mcp-local-rag
pnpm installpnpm test # All tests
pnpm run type-check # TypeScript check
pnpm run check:fix # Lint + format
pnpm run check:all # Full CI pipelinesrc/
index.ts # Entry point
server/ # MCP tool handlers
cli/ # CLI subcommands
parser/ # PDF/DOCX/TXT/MD/code parsing
chunker/ # SemanticChunker + CodeChunker
embedder/ # Transformers.js embeddings
vectordb/ # LanceDB operations
utils/ # Shared utilities (security, scan, scope)
__tests__/ # Test suitesLicense
MIT License. Free for personal and commercial use.
Acknowledgments
Built with Model Context Protocol (Anthropic), LanceDB, and Transformers.js.
Available Tools
16 toolsconfigA
Read or update runtime configuration. Without arguments, returns current config (hybridWeight, maxDistance, maxFiles, grouping). With arguments, updates the specified keys and returns the new config. Changes take effect immediately β no restart required.
| Name | Required | Description | Default |
|---|---|---|---|
| grouping | No | Grouping mode: "similar" (single group) or "related" (two groups). | |
| maxFiles | No | Maximum number of distinct files to return in search results. | |
| maxDistance | No | Maximum vector distance threshold for quality filtering. | |
| hybridWeight | No | Hybrid search weight (0.0 = vector only, 1.0 = BM25 only). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden. It discloses that updates take effect immediately with no restart required, and that it returns the new config. However, it doesn't clarify whether changes persist across sessions or details about partial updates beyond 'specified keys'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, efficiently conveying both get and set modes. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simple nature, the description covers invocation, behavior, and return values. The schema fully documents parameters. It lacks error handling details, but overall complete for this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and each parameter has its own description. The tool description merely lists the parameter names without adding extra meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads or updates runtime configuration, listing the specific config keys. It distinguishes itself from file/search tools in the sibling list by being the only configuration tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit usage modes: without arguments it returns current config, with arguments it updates specified keys. This gives clear context for when to invoke it, though it doesn't mention when not to use it or alternatives (none needed).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dedup_checkA
Detect near-duplicate documents in the index by computing content hashes for every chunk. Returns file pairs with high chunk overlap, sorted by similarity. Use to identify accidentally duplicated or re-ingested content.
| Name | Required | Description | Default |
|---|---|---|---|
| threshold | No | Similarity threshold (0.5 = 50% chunk overlap, default 0.8). Only pairs above this threshold are reported. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the computational approach (computing content hashes for every chunk) and the output format (file pairs sorted by similarity), but does not explicitly state whether the operation is read-only or mention potential performance impact.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: two sentences covering purpose, method, output, and use case. Every sentence delivers value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description is fairly complete. It explains the return format at a high level and provides usage guidance. A minor gap is the lack of an explicit statement that the operation is read-only, but the description is otherwise sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides a detailed description of the threshold parameter, including meaning, default, and range. The tool description adds no additional parameter semantics beyond what the schema provides, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool detects near-duplicate documents using content hashes and returns file pairs with high chunk overlap. It is specific about the verb (detect) and resource (documents in the index), and distinguishes itself from sibling tools like ingest_file or query_documents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear use case: 'Use to identify accidentally duplicated or re-ingested content.' While it doesn't explicitly mention when not to use it or name alternatives, the context is sufficient given the tool's unique niche among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_fileA
Delete a previously ingested file or data from the vector database. Use filePath for files ingested via ingest_file, or source for data ingested via ingest_data. Either filePath or source must be provided. Returns deleted (operation succeeded), removedChunks, and existed (whether anything was actually present).
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Source identifier used in ingest_data. Examples: "https://example.com/page", "clipboard://2024-12-30" | |
| filePath | No | Absolute path to the file (for ingest_file). Example: "/Users/user/documents/manual.pdf" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses return values (deleted, removedChunks, existed) and the conditional requirement, which goes beyond the schema. It does not explicitly state irreversibility, but the term 'delete' implies it, and chunk removal is mentioned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loaded with the action, and every sentence adds value. It is concise without sacrificing important details like return values and parameter selection.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the moderate complexity of the tool, the description covers the essential decision (filePath vs source), the required parameter constraint, and the return values. It lacks edge-case details like what happens if both parameters are provided, but this is minor given the overall clarity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds critical semantic context by mapping parameters to ingestion methods and clarifying the 'either/or' requirement. This goes beyond the schema's examples and helps the agent choose correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool deletes a previously ingested file or data from the vector database, using specific verbs and resource. It distinguishes itself from sibling tools like ingest_file and query_documents, as deletion is a unique operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly explains when to use each parameter: filePath for files ingested via ingest_file, source for data ingested via ingest_data. It also states that either must be provided, guiding the agent on parameter selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
export_indexA
Export the current index to a JSON file for backup or migration. Returns the export file path and stats (document count, chunk count, file size). The exported file can be re-imported with a future import_index tool.
| Name | Required | Description | Default |
|---|---|---|---|
| outputPath | No | Absolute path for the export file. Defaults to "{dbPath}/export-{timestamp}.json". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosure. It reveals that the tool returns the export file path and stats (document count, chunk count, file size), and that the output is importable later. It does not mention potential side effects, but the operation is clearly non-destructive and the return information adds useful context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose. Every sentence adds value: purpose, return stats, and future importability. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and no output schema, the description is nearly complete. It states purpose, return values, and use case. It could mention behavior if the output file already exists, but that is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% because outputPath has a detailed description with default behavior. The tool description does not add extra meaning beyond the schema, but the schema itself is sufficient, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Export the current index to a JSON file for backup or migration.' This specifies the verb (export), resource (current index), and output (JSON file), distinguishing it from sibling tools like ingest_file, query_documents, and delete_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear use cases ('for backup or migration') and notes the exported file can be re-imported with a future import_index tool. While it does not explicitly name alternatives or when-not-to-use, the context is sufficient for an agent to decide when to invoke this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_definitionA
Find where a symbol (function, class, variable, etc.) is defined in code files. Searches AST-level entity metadata extracted during code chunking. Returns { totalMatches, matches: [{ filePath, chunkIndex, entityName, entityType, lineRange?, scope? }] }. Only works for code files that were ingested with AST-level chunking (CodeChunker).
| Name | Required | Description | Default |
|---|---|---|---|
| symbolName | Yes | Exact symbol name to locate the definition of. Case-sensitive. Example: "handleFindReferences". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the internal mechanism (AST-level metadata), provides the return format, and states a key limitation (requires CodeChunker). For a read/search operation, this is transparent enough, though it does not explicitly mention error conditions or confirm it is non-mutating.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences: it front-loads the core action, then adds the mechanism, and finally the return shape and constraint. Every sentence earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description is complete. It provides the return structure, the search domain, and the prerequisite condition (CodeChunker ingestion). An agent has enough to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not add parameter-specific information beyond the schema. The schema already fully documents symbolName with case-sensitivity and an example. With 100% schema coverage, the baseline score of 3 is appropriate; no additional parameter details are necessary.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Find where a symbol (function, class, variable, etc.) is defined in code files.' It specifies the resource (code files) and the search domain (AST-level entity metadata). This distinguishes it from sibling tools like find_references, which would focus on usages rather than definitions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied: use when you need to locate a definition. It gives an important constraint ('Only works for code files that were ingested with AST-level chunking') but does not explicitly compare to alternatives like find_references or say when not to use this tool. This is adequate but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_referencesA
Find all references to a symbol across ingested code files using a two-phase strategy: (1) import metadata scan for exact import name matches, (2) FTS text search for in-code mentions. Results merge with import references first, deduplicated by (filePath, chunkIndex). Returns { totalMatches, matches: [{ filePath, chunkIndex, referenceType, context?, importSource?, isDefault?, isNamespace? }] }. Only works for code files ingested with AST-level chunking.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of matches (default 10, range 1-50). | |
| symbolName | Yes | Symbol name to search for. Exact match in imports; substring match in text mentions (FTS). Example: "useEffect". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and excels: it details the two-phase search strategy, merge order, deduplication key, output structure, and a prerequisite condition. This goes beyond a typical description and provides rich behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with four sentences that are all informative. It front-loads the main action, then provides algorithm, return shape, and constraints without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the return structure (mitigating no output schema), explains the algorithm, and states a prerequisite. It could optionally mention possible referenceType values or error behavior, but these are not essential for usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters (symbolName, limit) are fully described in the input schema, including semantics ('exact match in imports; substring match in text mentions') and limits (default 10, range 1-50). The description adds no new parameter semantics beyond the schema, so it does not exceed the schema's coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Find all references to a symbol across ingested code files', which is a specific verb+resource+scope. It distinguishes from sibling find_definition by using 'references' rather than 'definition'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear usage context ('across ingested code files') and a prerequisite (AST-level chunking), but it does not explicitly mention alternatives or when not to use it. Usage is implied by the purpose rather than explicitly compared to sibling tools like find_definition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
health_checkA
Diagnose server health and configuration. Checks embedder (model loaded?), LanceDB (readable?), BASE_DIRs (reachable on disk?), and cache directory (writable?). Returns structured pass/fail results with a human-readable summary and per-check fix suggestions for any failures.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses what is checked (model loaded, DB readable, dirs reachable, cache writable) and the return format (structured pass/fail with summary and fix suggestions). It doesn't state whether the operation is read-only, but the content implies a non-mutating diagnostic. This is good coverage for a health check.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: the first states the high-level purpose, the second details specific checks and output format. Every sentence adds value, and it is front-loaded with the verb 'Diagnose'. Extremely concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool with no output schema, the description is remarkably complete. It explains the checks performed, the return type, and even mentions fix suggestions. There is no ambiguity about what the tool does or returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema provides all the needed information. The description correctly avoids adding parameter syntax since none exist. Baseline 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it diagnoses server health and configuration, enumerating specific checks (embedder, LanceDB, BASE_DIRs, cache). It doesn't explicitly differentiate from the sibling 'status' tool, but the verb 'diagnose' and listed components make the purpose clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use when needing to diagnose server health. No explicit when/when-not or alternatives are mentioned, such as comparing with 'status' for system-level checks. The description provides context but lacks exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_dataA
Ingest in-memory content as a string (use ingest_file for files on disk). The source identifier enables re-ingestion to update existing content. Returns { filePath, chunkCount, timestamp, fileTitle }.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The content to ingest (text, HTML, or Markdown) | |
| metadata | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It reveals a key behavioral traitβre-ingestion with the same source identifier updates existing contentβand specifies the return shape. While it does not mention auth, permissions, or side effects, it covers the main behavioral consequences for the typical use case.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long and front-loaded with the tool's core purpose. It efficiently packs the alternative tool reference, the re-ingestion behavior, and the return value into a compact, well-structured format with zero filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 2 parameters (one nested), no annotations, and no output schema, the description provides a complete picture: what it does, when to use it, how the source identifier behaves, and what it returns. It lacks explicit error scenarios or prerequisites, but these are not critical for a simple ingestion tool. The return value statement covers the output side.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (content and format described in schema, metadata partially). The description adds significant value by explaining the 'source' identifier protocol with examples (e.g., 'clipboard://2024-12-30', 'chat://2024-12-30/project-discussion'), which is essential for correct invocation. This compensates well for the moderate schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Ingest' and clearly specifies the resource: 'in-memory content as a string'. It further distinguishes itself from a sibling tool by explicitly pointing to 'ingest_file' for disk files, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool (in-memory string content) and when not to (files on disk, via 'use ingest_file for files on disk'). This provides clear alternatives and context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_directoryA
Batch ingest all supported files in a directory. Recursively scans for code and document files under the given path, ingesting each one with AST-level (code) / semantic chunking. Returns per-file status plus totals. Use this for initial bulk ingestion or after deleting the database.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the directory to ingest. Must be within a configured base directory. Example: "/Users/user/project/src". | |
| extensionFilter | No | Optional file extension filter (without leading dot). Example: ["ts", "tsx", "js"]. When omitted, all supported file types are ingested. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses recursion, chunking strategies (AST-level for code, semantic for documents), and return value structure (per-file status plus totals). It does not cover edge cases like error handling or overwrite behavior, but the provided details are substantial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first front-loads the action and scope, the second provides usage guidance. Every sentence earns its place with no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 params, no output schema, no annotations), the description covers purpose, usage timing, and return values. It is sufficiently complete for an agent to select and invoke the tool correctly, though it could mention whether ingestion overwrites existing documents.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with descriptions for both parameters (path and extensionFilter), including examples. The description adds no additional parameter semantics beyond what the schema already contains, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb and resource: 'Batch ingest all supported files in a directory.' It also adds detail about recursive scanning and file types, distinguishing it from sibling tools like ingest_file (single file) and ingest_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool: 'Use this for initial bulk ingestion or after deleting the database.' However, it does not name alternatives or provide when-not-to-use guidance, which would warrant a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_fileA
Ingest a document file (PDF, DOCX, TXT, MD) into the vector database. Path must be absolute; re-ingesting the same path replaces its existing data. Returns { filePath, chunkCount, timestamp, fileTitle }.
| Name | Required | Description | Default |
|---|---|---|---|
| visual | No | Run VLM captioning on figure pages (PDF only; default false). | |
| filePath | Yes | Absolute path to the file to ingest. Example: "/Users/user/documents/manual.pdf" | |
| visualQuality | No | VLM profile when visual is true (default "fast"). "quality" is more accurate on figures with in-image text but much heavier and slower. Ignored when visual is false. | fast |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of disclosing behavior. It explicitly states that re-ingesting replaces existing data, revealing a destructive side effect, and also specifies the return object structure. It does not cover other potential behaviors like long-running VLM processing, but the key destructive behavior is disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with zero waste. First sentence front-loads action and resource, second sentence covers constraints and return value. Highly scannable and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers essential operational context: supported file types, absolute path requirement, replacement behavior, and return format. It lacks explicit separation from sibling ingest tools (ingest_data, ingest_directory) but otherwise provides a complete picture for a single-file ingestion tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by listing allowed file extensions (PDF, DOCX, TXT, MD) for filePath, which the schema does not specify. It also clarifies replacement semantics tied to the file path. It does not add extra detail for visual or visualQuality beyond what the schema provides, so a slight uplift is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the verb 'Ingest' and resource 'document file (PDF, DOCX, TXT, MD) into the vector database'. It implicitly distinguishes itself from sibling tools like ingest_directory by focusing on a single document file with an absolute path, and from ingest_data by specifying file formats.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states clear context: use for ingesting a document file, path must be absolute, and re-ingesting the same path replaces existing data. It does not explicitly name alternatives or exclusions, but the singular 'file' and mention of supported extensions imply single-file use, differentiating from ingest_directory.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_filesA
List supported files (PDF, DOCX, TXT, MD) under the configured base directories and whether each is ingested. Returns { baseDirs, files, sources }; sources lists ingested items reported apart from the file scan, chiefly ingest_data content (web pages, clipboard, etc.).
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Optional absolute path prefix(es) β one string or a list (unioned) β restricting the listing to files reachable at a path equal to or under a prefix within the base directories. "/docs/api" matches "/docs/api/x.md" but not "/docs/apiv2". Must be absolute (server OS style); a relative prefix matches nothing. Scope filters files by their scan path; ingest_data sources, which have no base-directory path, are always listed. | |
| instance | No | Filter files by instance name. Omit to list all instances. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does well by stating the tool operates on configured base directories, supported file types, and returns a specific structure including a distinction between file scan and ingest_data sources. It does not discuss permissions or pagination, but these are less critical for a listing operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core action, and concise. It avoids redundancy with the schema and every part adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description plus schema is sufficiently complete: it clarifies the return object and sources concept, and parameters are fully described. It doesn't elaborate on file object fields or empty states, but these are not essential for a listing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with both parameters already well-documented in the schema. The tool description adds no additional parameter semantics beyond what is in the schema, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists supported files (PDF, DOCX, TXT, MD) and their ingestion status, with a specific verb and resource. It also distinguishes the return structure, making its purpose distinct from sibling tools like query_documents or ingest_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternative tools are mentioned. However, the description implies its use for inspecting file inventory and ingestion status, and the mention of sources vs. files gives some context. It does not state when to prefer it over query_documents or status.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_documentsA
Search ingested documents with hybrid keyword + semantic matching. Returns results sorted by relevance, each with filePath, chunkIndex, text, fileTitle, score (0 = best, higher = worse), and source (for ingest_data items).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 10, range 1-20). Lower favors precision, higher recall. | |
| query | Yes | Search query. Preserve specific user terms (for keyword match); add context when the query is vague (for semantic match). | |
| scope | No | Optional absolute path prefix(es) β one string or a list (unioned) β restricting results to a filePath equal to or under a prefix. "/docs/api" matches "/docs/api/auth.md" but not "/docs/apiv2". Must be absolute (server OS style); a relative prefix matches nothing β derive one from a filePath returned by an earlier query, or omit scope. | |
| instance | No | Instance name to search. Use "*" for all instances. Required when multiple instances are configured. | |
| searchMode | No | Search mode preset. "exact" (hybridWeight=0.8) for identifiers and symbols, "code" (0.5) for balanced code understanding, "doc" (0.3) for broad semantic search. Overrides per-instance hybridWeight defaults. | |
| fromTimestamp | No | Optional ISO 8601 timestamp β only return chunks ingested on or after this time. Example: "2026-07-01T00:00:00Z". | |
| untilTimestamp | No | Optional ISO 8601 timestamp β only return chunks ingested on or before this time. Example: "2026-07-10T23:59:59Z". | |
| highlightContext | No | Characters of surrounding context around each query-term match in the returned chunks (default 0 = no highlight). When > 0, results include a "matchContext" array with highlighted snippets. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavior. It adds value by specifying the return shape (filePath, chunkIndex, text, fileTitle, score) and clarifying score semantics (0 = best, higher = worse) and the source field for ingest_data items. It does not discuss errors or permissions, but for a read-only search tool, this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences: the first states the action, the second lists the result fields and score behavior. Every word earns its place, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having 8 parameters and no output schema, the description covers the key missing pieceβthe return value structureβalong with the non-obvious score ordering. The schema already provides exhaustive parameter details, so the description plus schema form a complete picture for an agent to invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does not elaborate on individual parameters; it only mentions hybrid matching, which is already reflected in searchMode. Since the schema fully documents all parameters, the description adds no extra semantic value for params, but it does not need to.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Search ingested documents with hybrid keyword + semantic matching.' It clearly distinguishes this tool from siblings like delete_file, ingest_file, and list_files, and even from find_definition/find_references by emphasizing general hybrid search rather than specific symbol lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the tool's core function and that it returns relevance-sorted results, giving implied context for when to use it. However, it does not explicitly contrast it with siblings such as find_definition or find_references, nor does it state when to prefer one over another, so usage guidance remains implicit rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_chunk_neighborsA
Read the chunks immediately before and after a query_documents result, in the same document, for more surrounding context. Pass chunkIndex from the result plus exactly one of filePath (ingest_file) or source (ingest_data). Returns the target chunk (isTarget: true) and its neighbors, ascending by chunkIndex; an out-of-range chunkIndex returns []. Defaults: before=2, after=2 (max 50 each).
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Number of chunks to retrieve after the target (0β50, default 2). | |
| before | No | Number of chunks to retrieve before the target (0β50, default 2). | |
| source | No | Source identifier (for ingest_data documents). Provide exactly one of filePath or source. Examples: "https://example.com/page", "clipboard://2024-12-30". | |
| filePath | No | Absolute path to the file (for ingest_file documents). Provide exactly one of filePath or source. Example: "/Users/user/documents/manual.pdf". | |
| chunkIndex | Yes | Zero-based target chunk index (non-negative integer). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden for behavioral disclosure. It thoroughly explains return behavior: target chunk (isTarget: true), neighbors ascending by chunkIndex, out-of-range returns [], and defaults (before=2, after=2, max 50 each). This goes well beyond basic descriptions and covers edge cases and ordering.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, directly front-loaded with the main purpose. Each sentence earns its place: purpose, parameter usage, and return behavior. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description fully explains the return structure: target chunk, neighbors, ordering, and edge-case behavior. It also sets expectations for defaults and limits, making it complete for a moderate-complexity read tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds significant context beyond the schema: it explicitly ties chunkIndex to a query_documents result, emphasizes the exclusivity of filePath vs source, and reiterates defaults and maximums. This enriches the parameter semantics meaningfully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action: 'Read the chunks immediately before and after a query_documents result, in the same document.' This distinguishes it from query_documents (which retrieves results) and other tools by focusing on neighboring chunks. The verb 'read' and resource 'chunks' are explicit and specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance by instructing to 'Pass chunkIndex from the result plus exactly one of filePath (ingest_file) or source (ingest_data).' This contextualizes the tool as a follow-up to query_documents. However, it does not explicitly compare to alternatives or state when not to use it, so it falls just short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reindex_allA
Re-ingest ALL indexed files from scratch. Delete existing chunks, then re-ingest every previously-indexed file. Use after changing the embedding model, chunker parameters, or when the index is corrupted. This is a slow, destructive operation β prefer reindex_stale for routine updates.
| Name | Required | Description | Default |
|---|---|---|---|
| optimizeAfter | No | Run optimize() after all files are re-ingested (default true). Set to false when calling reindex_all in a loop. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It explicitly discloses destructive behavior: 'Delete existing chunks' and 'slow, destructive operation.' This goes beyond vague warnings and gives concrete behavioral details, making the tool's impact transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first states the action and method, the second covers use cases and a warning with an alternative. Every phrase adds value, and the destructive nature is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the operation is destructive and potentially slow, the description covers what it does, when to use it, why, the alternative, and a warning. No output schema is present, but the core selection and invocation context is fully addressed, making it complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the only parameter optimizeAfter already has a clear description in its schema. The tool description does not add parameter-level context, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line 'Re-ingest ALL indexed files from scratch' states a specific verb and resource, and the description explicitly contrasts with reindex_stale ('prefer reindex_stale for routine updates'), distinguishing it from sibling tools. It clearly names the operation and scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use conditions ('after changing the embedding model, chunker parameters, or when the index is corrupted') and provides a direct alternative with an exclusion ('prefer reindex_stale for routine updates'). This is exactly the guidance needed for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reindex_staleA
Re-ingest all files whose disk contents have changed since the last ingestion (detected via mtime comparison). Returns the count of stale files that were re-ingested. Use when you know files have been modified but the index is out of date.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the detection method (mtime comparison) and the return value (count of stale files re-ingested), which goes beyond a generic restatement. It could mention potential side effects or state changes more explicitly, but overall it provides meaningful insight into the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core action, followed by the return value and usage guidance. Every sentence earns its place with no redundancy or fluff, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no parameters, no annotations, and no output schema, the description covers the what (re-ingests changed files), the when (index out of date), the mechanism (mtime), and the expected response (count). This is fully adequate for an agent to select and invoke the tool confidently, especially given the sibling tool context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema is empty, so the baseline is 4. The description doesn't need to explain parameters; it correctly focuses on the tool's operation and output, adding no irrelevant parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action (re-ingest), the target resource (files with changed disk contents), and the detection mechanism (mtime comparison). This distinguishes it from siblings like reindex_all, which likely re-ingests everything, and ingest_file, which targets a specific file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly provides a use case: 'Use when you know files have been modified but the index is out of date.' This gives clear context for when to invoke the tool. It does not explicitly mention alternative tools or exclusionary conditions, but the guidance is sufficient for an agent to make an informed choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
statusA
Get index status: { documentCount, chunkCount, memoryUsage (MB), uptime (s), ftsIndexEnabled, searchMode, instances }. When multiple instances are configured, pass instance name for per-instance status.
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | Filter status by instance name. Omit for aggregated status across all instances. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It conveys read-only intent via 'Get' and describes output formatting (MB, s) and per-instance behavior, but does not mention error cases, auth requirements, or data safety. The disclosed behavior is useful but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose and output fields. The conditional instance guidance is concise and both sentences add value with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple status tool with one optional parameter and no output schema, the description covers the key returned fields and instance behavior. It is mostly complete, though it could mention the relationship to health_check, but this is not strictly necessary for a standalone status tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes the 'instance' parameter fully, and the description adds context about when to use it (multiple instances). Since schema coverage is 100%, the baseline of 3 applies; the description slightly reinforces but does not significantly add beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get index status' with a specific list of returned fields, indicating a read-only status operation. It does not explicitly differentiate from sibling tools like health_check, but the verb+resource combination is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides conditional usage guidance: 'When multiple instances are configured, pass instance name for per-instance status.' It does not explicitly state when to use this tool over alternatives like health_check, so usage context is implied rather than fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v0.21.0- First observed
config - First observed
dedup_check - First observed
delete_file - First observed
export_index - First observed
find_definition - First observed
find_references - First observed
health_check - First observed
ingest_data - First observed
ingest_directory - First observed
ingest_file - First observed
list_files - First observed
query_documents - First observed
read_chunk_neighbors - First observed
reindex_all - First observed
reindex_stale - First observed
status
TDQS
Scored across 16 tools
Tools are largely distinct, but status and health_check both report on system state, and reindex_stale/reindex_all share a purpose though descriptions clarify the difference. Most tools target unique resource+action combinations (ingest, query, delete, list, config).
Nearly all tools follow a verb_noun pattern in snake_case (query_documents, ingest_file, delete_file, reindex_stale). Exceptions like 'status' and 'config' are bare nouns, and 'dedup_check' reverses the order, but the overall pattern is predictable.
16 tools is slightly above the typical 3-15 range but justified given the server's broad scope (ingestion, querying, index management, code analysis, configuration, health, export). Each tool serves a distinct purpose and the count feels reasonable for a full-featured RAG server.
The tool surface covers the core RAG lifecycle: multiple ingestion methods, querying with context reading, deletion, listing, reindexing (stale/all), deduplication, configuration, export, and health checks. Minor gaps exist, such as no explicit 'get_document' tool, but query_documents and read_chunk_neighbors provide adequate access. Code analysis is well-covered with find_definition and find_references.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Self-hosted AI-native knowledge workspace with hybrid search, GraphRAG, and MCP.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
An MCP server that gives your AI access to the source code and docs of all public github repos
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Related MCP Servers
- AlicenseAqualityAmaintenanceLocal MCP server for semantic code search using Tree-sitter AST parsing, local embeddings, and hybrid search; enables indexing and querying codebases entirely offline.5MIT
- AlicenseAqualityAmaintenanceA 100% local MCP server for semantic and lexical search over your code, library docs, and PDFs, featuring hybrid BM25 and dense retrieval, syntax aware chunking, and an optional code knowledge graph. It also ships a Coral integration, so you can expose your code search as SQL and join it with live data, all without anything leaving your machine.8169Apache 2.0
- AlicenseAqualityDmaintenanceLocal-first MCP server for semantic + keyword hybrid code search. Zero external services, no API keys required.2MIT
- AlicenseAqualityAmaintenanceMCP server for semantic code search with AST-aware chunking, hybrid vectors, and query syntax.121Apache 2.0