opencode-document-rag-mcp
Local Document MCP Server with Marker and ChromaDB
Dieses Projekt implementiert einen Python-MCP-Server für OpenCode. Er liest PDF-, Word- (.docx), PowerPoint- (.pptx) und EPUB-Dateien, die unter DOCS/ liegen, und schließt dabei stets DOCS/mdDB/ aus. Er konvertiert die Dokumente mit Marker nach Markdown, bewahrt Tabellen und Gleichungen als LaTeX, speichert die vollständigen Markdown-Dateien unter DOCS/mdDB/ und erstellt einen persistenten semantischen Index in ChromaDB.
Das Retrieval ist strukturbewusst. ChromaDB lokalisiert die für eine Abfrage relevantesten Chunks, aber der MCP-Server gibt keinen isolierten Chunk zurück. Er nutzt die Ergebnis-Metadaten, um die ursprüngliche Markdown-Datei zu öffnen und den vollständigen, durch Überschriften abgegrenzten Abschnitt zu rekonstruieren. Die Antwort enthält den umgebenden Text, Tabellen und Gleichungen sowie Dateipfade und Zeilenbereiche.
Datenfluss
flowchart TD
A["DOCS: PDF, DOCX, PPTX, EPUB"] --> B["Marker 2"]
B --> C["Complete Markdown + images"]
C --> D["DOCS/mdDB"]
C --> E["Structural chunks"]
E --> F["Local ChromaDB"]
G["OpenCode query"] --> F
F --> H["Chunk metadata"]
H --> D
D --> I["Complete Markdown section"]
I --> GJeder Chunk speichert mindestens source_path, markdown_path, section_title, section_path, section_start_line, section_end_line, chunk_start_line und chunk_end_line. Außerdem speichert er SHA-256-Hashes des Quelldokuments und der Markdown-Datei, um Änderungen zu erkennen.
Related MCP server: Personal Semantic Search MCP
Projektstruktur
current-project/
├── DOCS/
│ ├── article.pdf
│ ├── manual.docx
│ └── mdDB/
│ ├── article.md
│ ├── manual.md
│ └── .chroma/
├── .opencode/
│ └── MCP/
│ └── opencode-document-rag-mcp/
│ ├── src/doc_rag_mcp/
│ ├── tests/
│ ├── README.md
│ └── pyproject.toml
└── opencode.jsoncQuelldokumente können direkt unter DOCS/ oder in einem beliebigen Unterverzeichnis außer DOCS/mdDB/ abgelegt werden. Ihre relative Verzeichnisstruktur bleibt in der Ausgabe erhalten. Beispielsweise erzeugt DOCS/manuals/instrument.pdf die Datei DOCS/mdDB/manuals/instrument.md. Extrahierte Bilder werden neben der Markdown-Datei unter instrument_assets/ gespeichert, und ihre Links werden als relative Pfade umgeschrieben. Der gesamte Verzeichnisbaum DOCS/mdDB/ ist von der Erkennung ausgeschlossen, damit der MCP-Server nicht seine eigene Ausgabe verarbeiten kann.
Voraussetzungen
Python 3.10–3.13 und uv sind erforderlich. Marker 2 benötigt ein Inferenz-Backend für OCR und Gleichungen. llama.cpp wird auf macOS oder reinen CPU-Systemen empfohlen. Systeme mit NVIDIA-GPUs können das über Surya konfigurierte VLLM-Backend verwenden.
Unter macOS:
brew install uv llama.cppUnter Linux installieren Sie uv und ein aktuelles llama-server-Binary von llama.cpp. Für NVIDIA-Systeme installieren Sie Docker und das NVIDIA Container Toolkit entsprechend den Anforderungen von Marker.
Installation
Entpacken Sie das Release-Archiv direkt in das Stammverzeichnis des aktuellen Projekts. Das Archiv enthält bereits die Verzeichnisstruktur .opencode/MCP/opencode-document-rag-mcp/:
cd /path/to/current-project
unzip opencode-document-rag-mcp-v1.1.2.zip -d .
uv sync --project .opencode/MCP/opencode-document-rag-mcpNach dem Entpacken ist der MCP-Server genau hier installiert:
.opencode/MCP/opencode-document-rag-mcpDie erste Konvertierung und die erste Vektorisierung laden die erforderlichen Modelle herunter. Das ONNX-Embedding-Modell wird unter DOCS/mdDB/.chroma/.embedding_models/ gespeichert. Marker-Modelle verwenden den von Marker und Surya konfigurierten Cache. Der erste Vorgang kann einige Zeit dauern und mehrere Gigabyte verbrauchen. DOCX-, PPTX- und EPUB-Dokumente erfordern die Variante marker-pdf[full], die bereits in pyproject.toml enthalten ist.
OpenCode-Konfiguration
Kopieren Sie die Konfiguration aus opencode.example.jsonc in die Datei opencode.json oder opencode.jsonc im Projektstamm. Wenn der MCP-Server an anderer Stelle gespeichert ist, ändern Sie nur den Pfad, der auf --project folgt.
Mindestkonfiguration:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"document-rag": {
"type": "local",
"command": [
"uv",
"run",
"--project",
".opencode/MCP/opencode-document-rag-mcp",
"doc-rag-mcp"
],
"cwd": ".",
"enabled": true,
"timeout": 30000,
"environment": {
"DOC_RAG_PROJECT_ROOT": ".",
"SURYA_INFERENCE_BACKEND": "llamacpp",
"SURYA_INFERENCE_KEEP_ALIVE": "true"
}
}
}
}Die Einstellung cwd: "." löst alle Pfade relativ zum Stamm des in OpenCode geöffneten Projekts auf. Überprüfen Sie die Verbindung mit:
opencode mcp listDie Datei AGENTS.example.md enthält eine optionale Richtlinie, die OpenCode anweist, diesen MCP-Server abzufragen, bevor Fragen zu den Dokumenten beantwortet werden. Sie können deren Inhalt in die Datei AGENTS.md des Projekts übernehmen.
MCP-Tools
Tool | Funktion |
| Listet unterstützte Dateien unter |
| Konvertiert und indexiert eine Datei. Mit |
| Synchronisiert alle Quelldokumente und überspringt unveränderte Dateien. |
| Führt eine semantische Suche durch und gibt vollständige Markdown-Abschnitte von der Festplatte zurück. |
| Liest einen bestimmten Abschnitt über seinen hierarchischen Pfad. |
| Meldet indexierte Dokumente und Chunk-Anzahlen. |
Verwenden des MCP-Servers in OpenCode
Legen Sie Quelldokumente unter DOCS/ ab, aber niemals unter DOCS/mdDB/. Sie können dann beispielsweise folgende Anfragen verwenden:
Use document-rag to list the available documents.Use ingest_all_documents to convert and index every source document under DOCS, excluding mdDB.Search the documents for the definition of wave energy flux, preserving the related LaTeX equations and tables.Search only manual_tecnico.pdf for the instrument's operating limits and cite the Markdown section and line range.Read the Methods > Statistical analysis section from article.docx.Erweitertes Retrieval
search_documents akzeptiert query, einen top_k-Wert von 1 bis 20 und einen optionalen document_name. Intern fordert es zusätzliche Ergebnisse von ChromaDB an, damit nicht mehrere Chunks aus demselben Abschnitt jede Ergebnisposition belegen. Anschließend entfernt es doppelte Abschnitte und gibt bis zu top_k verschiedene Abschnitte zurück.
Jedes Ergebnis enthält context, den vollständigen Abschnitt, der zum Zeitpunkt der Abfrage von der Festplatte gelesen wird. index_is_current gibt an, ob die Markdown-Datei noch denselben Hash hat wie zum Zeitpunkt der Indexierung. Wenn dieser Wert false ist, führen Sie ingest_document oder ingest_all_documents aus. Wenn sich das Quelldokument nicht geändert hat, indexiert das System das vorhandene Markdown neu, ohne Marker erneut auszuführen.
Konvertierung und Gleichungen
Marker erzeugt formatierte Tabellen und LaTeX-Gleichungen, die durch $$ begrenzt werden. Der Standardmodus ist balanced; er eignet sich, wenn die Wiedergabetreue von Tabellen, OCR und Mathematik Priorität hat. Auf CPU- oder Apple-Silicon-Systemen reduzieren Sie den Verarbeitungsaufwand mit:
"DOC_RAG_MARKER_MODE": "fast"Für gescannte Dokumente oder unlesbaren Text:
"DOC_RAG_FORCE_OCR": "true"Für Markers optionale hybride Korrektur über einen kompatiblen LLM-Dienst:
"DOC_RAG_USE_LLM": "true"Die letzte Option erfordert Zugangsdaten und einen von Marker unterstützten Dienst. Für den normalen Betrieb des MCP-Servers ist sie nicht erforderlich.
Umgebungsvariablen
Variable | Standard | Beschreibung |
|
| Stammverzeichnis des aktuell geöffneten Projekts. |
|
| Quellverzeichnis für Dokumente; |
|
| Speicherverzeichnis für das vollständige Markdown. |
|
| Lokales Persistenzverzeichnis für ChromaDB. |
|
| Name der ChromaDB-Sammlung. |
|
| Zielgröße für jeden Chunk. |
|
| Markers Modus |
|
| Erzwingt OCR für das gesamte Dokument. |
|
| Aktiviert Markers hybride LLM-Korrektur. |
Sicherheit und Konsistenz
Der Server lehnt nicht unterstützte Dateiendungen, ..-Pfad-Traversierung, Quellen außerhalb von DOCS/, jede Quelle innerhalb von DOCS/mdDB/ und Markdown-Pfade außerhalb von DOCS/mdDB/ ab. Ein in ChromaDB gespeicherter Pfad wird nie verwendet, ohne erneut validiert zu werden. Markdown-Schreibvorgänge sind atomar, und der Index-Austausch ist auf das jeweilige Dokument beschränkt.
Wenn zwei Dateien im selben Verzeichnis denselben Basisnamen haben, etwa manual.pdf und manual.docx, würden beide manual.md erzeugen. Der Server erkennt diese Kollision und verlangt, dass eine der Quelldateien umbenannt wird, bevor geschrieben oder indexiert wird.
Tests
Die Unit-Tests laden weder Marker noch ChromaDB. Sie validieren die hierarchische Segmentierung, die Erhaltung von Tabellen und Gleichungen, die Abschnittserweiterung und den Pfadschutz:
PYTHONPATH=src python -m unittest discover -s tests -vSie können die Syntax des gesamten Quellbaums auch überprüfen mit:
python -m compileall -q src testsLizenzen
Dieses Projekt wird unter der MIT-Lizenz vertrieben. Marker verwendet für seinen Code die Apache-2.0-Lizenz und für seine Modellgewichte eine separate Lizenz. Prüfen Sie Markers Bedingungen, bevor Sie Marker in großem Umfang kommerziell einsetzen.
Available Tools
6 toolsindex_statusA
Show indexed documents, Markdown paths, and chunk counts.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
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 of behavioral disclosure. While 'Show' implies a read-only operation, the description does not explicitly confirm non-destructive behavior or any side effects. It also doesn't mention anything about data freshness, caching, or potential errors. For a status tool, this is a notable gap.
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 a single sentence with no wasted words. It is front-loaded with the action and the key information. Every word contributes to understanding the tool's output. Excellent terseness.
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 zero-parameter read-only status tool, the description is largely sufficient. It outlines the output fields (documents, paths, chunk counts), and the presence of an output schema likely details the structure further. There is no mention of prerequites or potential pitfalls, but given the simple nature, this is acceptable.
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 per calibration the baseline is 4. The description does not need to explain parameter details. The absence of parameters is fully supported by the schema, and the description adds nothing extra but doesn't 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 clearly states the action ('Show') and the specific resource ('indexed documents, Markdown paths, and chunk counts'). This distinguishes it from siblings like ingest_document or search_documents, though it might overlap with list_documents. However, it specifies the exact output dimensions, making its 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?
The description implies usage for checking indexing status, but it does not explicitly state when to use this tool versus alternatives like list_documents. There is no mention of exclusions or alternative routing, leaving some ambiguity. The tool name 'index_status' suggests its purpose, but the description alone doesn't provide definitive guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_all_documentsC
Synchronize supported DOCS documents, excluding the mdDB output directory.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It only mentions the mdDB exclusion, but omits side effects (e.g., whether it modifies existing documents, idempotency, or the effect of the force parameter). 'Synchronize' implies mutation but does not clarify reversibility or safety.
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?
Description is a single sentence with zero fluff. The key action and exclusion are front-loaded, and every word contributes meaning. Perfectly concise for its scope.
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 one optional parameter and no annotations, the description is insufficient. It explains the core action but leaves the force parameter unexplained and provides no usage context. The presence of an output schema does not compensate for missing parameter semantics and usage guidance.
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 only parameter, 'force' (boolean, optional, default false), is not mentioned in the description. Since schema description coverage is 0%, the description must compensate but fails to explain what 'force' does (e.g., force re-ingestion). This is a significant gap.
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?
Description states a specific verb ('Synchronize') and resource ('supported DOCS documents') and adds a meaningful exclusion (mdDB output directory). It is clear enough to distinguish from the singular ingest_document by implying bulk action, though it doesn't explicitly say 'all'.
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 guidance is provided on when to use this tool versus siblings like ingest_document (per-document) or search_documents. The description does not mention any conditions or alternatives, leaving the decision entirely to the agent's inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_documentA
Convert one DOCS document to Markdown with Marker and index its structural chunks.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| document_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden. It states it converts and indexes but does not disclose side effects such as whether the original document is modified, how indexing affects existing chunks, or the meaning of the 'force' parameter. No mention of reversibility, permissions, or what happens on re-ingestion. This is a significant gap for a mutation tool.
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?
One concise sentence that front-loads the core action and key differentiator ('Convert one DOCS document'). No wasted words; efficient and immediately comprehensible.
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 an output schema, return values are covered, but the description lacks detail on the 'force' parameter, prerequisites (e.g., document existence), and the practical implications of indexing. The description is too minimal to fully guide correct invocation, especially for a tool with multiple steps and a boolean option.
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 0%, so the description must explain parameters. It implicitly identifies document_name as the document to convert, but it omits any explanation of the 'force' parameter. The description does not clarify what forcing does (e.g., overwrite existing index, skip cache), leaving an undocumented required-optional parameter.
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 (convert to Markdown) on a specific resource (one DOCS document), with additional detail (using Marker, indexing structural chunks). It clearly distinguishes from siblings like list_documents, ingest_all_documents (multiple), and search_documents or read_markdown_section, which have different purposes.
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 phrase 'one DOCS document' implicitly signals this tool is for single-document ingestion, contrasting with 'ingest_all_documents.' However, it does not explicitly name alternatives or exclude other use cases, leaving some guidance to inference. Clear context without explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_documentsA
List supported documents under DOCS while excluding DOCS/mdDB.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations available, the description carries the full burden of behavioral disclosure. It reveals that the tool is read-only in nature (a list operation) and scopes results to DOCS while excluding DOCS/mdDB, but it does not explicitly state that it causes no side effects or describe other behaviors such as sorting, pagination, or error conditions. The exclusion is useful context, but the description remains thin on overall behavioral cues.
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 a single, tightly packed sentence that immediately states the action, scope, and exclusion. There is no filler, and the most important information (the exclusion) is included without excess. This is an exemplary concise and well-structured description.
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 tool is low complexity with no parameters and an existing output schema, so the description does not need to explain return values. The only potential gap is the meaning of 'supported documents,' but for a simple listing tool, this is minimally ambiguous and likely inferable from context or the output schema. Overall, the description is sufficiently complete for an agent to call 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 tool takes zero parameters, and the schema coverage is 100% (vacuously). Per rubric, a tool with no parameters gets a baseline score of 4 since there are no parameter meanings to clarify; the description correctly avoids 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 states a specific action ('List') and a precise resource scope ('supported documents under DOCS') and adds an explicit exclusion ('excluding DOCS/mdDB'). This clearly differentiates it from sibling tools that ingest, search, or read documents, making the tool's 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 provides no guidance on when to use this tool versus alternatives like search_documents or read_markdown_section. It does not mention any context or conditions that would direct the agent away from other tools, leaving the decision entirely to inference from the tool's name and basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_markdown_sectionB
Read one complete section from the stored Markdown by its breadcrumb path.
| Name | Required | Description | Default |
|---|---|---|---|
| section_path | Yes | ||
| document_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
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 of behavioral disclosure. It states 'Read' implying a read‑only operation, but it does not explicitly confirm that no modifications occur, nor does it describe error behavior, return format (though an output schema exists), or any side effects. For a tool with no safety annotations, this is a significant transparency gap.
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 a single, front-loaded sentence with no filler. It states the primary action first and conveys the essential selection criterion without any extraneous words. This is an exemplar of concise, efficient writing.
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 the tool's simple nature, the description omits critical details: the format of the breadcrumb path, how to handle missing documents or sections, and what the output contains. With no schema descriptions and no annotations, the agent lacks sufficient context to reliably construct correct arguments and interpret results. The existence of an output schema does not compensate for the missing operational guidance.
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 0%, so the description must compensate for unrecognized parameters. It mentions 'breadcrumb path' which gives a hint about section_path, but it fails to explain the expected format (e.g., delimiters, hierarchy) or how document_name should be specified. Both parameters are undocumented in the schema and only minimally addressed by the description, leaving the agent to guess.
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 a specific verb ('Read') and identifies the resource ('one complete section from the stored Markdown') and the selection mechanism ('breadcrumb path'). This clearly differentiates it from siblings like list_documents (listing), ingest_document (creating), and search_documents (searching). An agent can immediately grasp the tool's function without needing additional context.
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 implies when to use the tool (when you need a specific section by breadcrumb path) but does not explicitly state when not to use it or mention alternatives. It lacks the explicit routing seen in better descriptions, such as naming search_documents for fuzzy or keyword-based lookups. The guidance is present but implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_documentsC
Search ChromaDB and return complete Markdown sections containing nearby tables and LaTeX equations.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| document_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output 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 does state that the tool returns 'complete Markdown sections', which informs the agent about the output nature. However, it omits any details about side effects (probably none since it's a search), error behavior, pagination, or limitations. Since it's a search tool, the read-only behavior is obvious but not explicitly stated. The disclosure is minimal but not misleading.
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 a single, front-loaded sentence with no redundant words. It immediately states the action and the output. This is ideal conciseness – every word earns its place. Nothing is fluff, and it is structured to be read quickly.
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 complexity (three parameters, with an output schema existing), the description is incomplete. It fails to cover parameter semantics, usage scenarios, and behavioral expectations beyond the basic output type. While the presence of an output schema may document the return structure, the description does not help the agent understand when to use the tool or how to fill in the parameters. It is adequate only for recognizing the tool's existence, not for correct invocation.
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 0%, and the description provides zero information about the three parameters (query, top_k, document_name). It does not explain what the query should contain, how top_k affects results, or what document_name filters. The agent must rely solely on the schema definitions (which have types and defaults but no semantic meaning). The description adds no value beyond what the schema already provides.
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 ('Search ChromaDB') and a specific output ('complete Markdown sections containing nearby tables and LaTeX equations'). This distinguishes it from sibling tools like list_documents or ingest_document, as it focuses on retrieval of content sections rather than listing or ingesting. However, it could be more precise about the semantic nature of the search and what 'nearby' implies, so not a 5.
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 offers no guidance on when to use this tool versus its siblings. It does not mention alternatives, prerequisites, or scenarios where this tool is preferred. While the purpose implies it's the tool for searching documents, there is no explicit direction such as 'use this to find relevant sections' or 'use list_documents to browse available documents'. This leaves the agent to infer usage context.
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.
6 tool updates
v0.1.0- First observed
index_status - First observed
ingest_all_documents - First observed
ingest_document - First observed
list_documents - First observed
read_markdown_section - First observed
search_documents
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: listing documents, ingesting a single document, ingesting all documents, searching, reading a section, and checking index status. The only potential overlap (ingest_document vs. ingest_all_documents) is clearly resolved by singular vs. plural scope, leaving no ambiguity for an agent.
Most tools follow a verb_noun pattern (list_, ingest_, search_, read_), but 'index_status' deviates by starting with a noun. Despite this minor inconsistency, all names are lowercase, underscore-separated, and self-descriptive, so the pattern remains predictable.
With only 6 tools, the server is well-scoped for a document RAG system. Each tool addresses a distinct step in the workflow—discovery, ingestion (single and bulk), retrieval, reading, and status monitoring—without redundancy or excess.
The surface covers the core lifecycle: listing available documents, ingesting new ones (single or all), searching indexed content, reading specific sections, and checking index status. Missing delete/update operations are minor gaps since the server focuses on additive indexing and retrieval, which is acceptable for its purpose.
Maintenance
Related MCP Connectors
Convert PDF, Word, Excel and scanned documents to Markdown, tables and RAG chunks. OCR.
High-fidelity PDF to structured Markdown conversion and document field extraction.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Related MCP Servers
- AlicenseAqualityAmaintenancePrivacy-first local document search using semantic search. Runs entirely on your machine with no cloud services, supporting PDF, DOCX, TXT, and Markdown files.94,493 npm412MIT
- FlicenseNot gradedqualityDmaintenanceEnables semantic search over local notes and documents using natural language queries. Supports multiple file types (Markdown, Python, HTML, JSON, CSV, text) with fast local embeddings and persistent ChromaDB vector storage.1-
- AlicenseNot gradedqualityDmaintenanceProvides token-efficient semantic search and document retrieval by indexing PDFs, text, and markdown files into local notebooks using ChromaDB. It enables AI agents to query relevant passages from large documents through local embedding models like Hugging Face or Ollama.1MIT
- FlicenseNot gradedqualityDmaintenanceConverts documents (PDF, DOCX, XLSX, PPTX, HTML, TXT, MD) to Markdown and stores them locally with search and retrieval capabilities.-