Skip to main content
Glama
humbertolvarona

opencode-document-rag-mcp

使用 Marker 和 ChromaDB 的本地文档 MCP 服务器

本项目为 OpenCode 实现了一个 Python MCP 服务器。它读取位于 DOCS/ 下的 PDF、Word(.docx)、PowerPoint(.pptx)和 EPUB 文件,始终排除 DOCS/mdDB/。它使用 Marker 将文档转换为 Markdown,将表格和公式保留为 LaTeX,将完整的 Markdown 文件存储在 DOCS/mdDB/ 下,并在 ChromaDB 中创建持久化语义索引。

检索是结构感知的。ChromaDB 定位与查询最相关的分块,但 MCP 服务器不会返回孤立的分块。它使用结果元数据打开原始 Markdown 文件,并重建由标题界定的完整章节。响应包括周围的文本、表格和公式,以及文件路径和行范围。

数据流

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 --> G

每个分块至少存储 source_path、markdown_path、section_title、section_path、section_start_line、section_end_line、chunk_start_line 和 chunk_end_line。它还存储源文档和 Markdown 文件的 SHA-256 哈希,以检测更改。

Related MCP server: Personal Semantic Search MCP

项目结构

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

源文档可以直接放在 DOCS/ 下,或放在除 DOCS/mdDB/ 之外的任何子目录中。它们的相对目录结构会在输出中保留。例如,DOCS/manuals/instrument.pdf 生成 DOCS/mdDB/manuals/instrument.md。提取的图像存储在 Markdown 文件旁边的 instrument_assets/ 下,其链接会被重写为相对路径。整个 DOCS/mdDB/ 目录树都会从发现中排除,因此 MCP 服务器无法处理自己的输出。

要求

需要 Python 3.10–3.13 和 uv。Marker 2 需要推理后端来处理 OCR 和公式。在 macOS 或仅 CPU 的系统上,推荐使用 llama.cpp。配备 NVIDIA GPU 的系统可以通过 Surya 配置 VLLM 后端。

在 macOS 上:

brew install uv llama.cpp

在 Linux 上,安装 uv 以及 llama.cpp 提供的最新 llama-server 二进制文件。对于 NVIDIA 系统,请按照 Marker 的要求安装 Docker 和 NVIDIA Container Toolkit。

安装

将发布归档直接解压到当前项目的根目录。该归档已包含 .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-mcp

解压后,MCP 服务器将恰好安装在:

.opencode/MCP/opencode-document-rag-mcp

首次转换和首次向量化会下载所需模型。ONNX 嵌入模型存储在 DOCS/mdDB/.chroma/.embedding_models/ 下。Marker 模型使用 Marker 和 Surya 配置的缓存。初始处理可能需要一些时间并占用数 GB 空间。DOCX、PPTX 和 EPUB 文档需要 marker-pdf[full] 变体,该变体已包含在 pyproject.toml 中。

OpenCode 配置

将 opencode.example.jsonc 中的配置复制到项目根目录的 opencode.json 或 opencode.jsonc 文件中。如果 MCP 服务器存储在其他位置,只需更改 --project 后面的路径。

最小配置:

{
  "$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"
      }
    }
  }
}

cwd: "." 设置会将所有路径解析为相对于在 OpenCode 中打开的项目根目录。使用以下命令验证连接:

opencode mcp list

AGENTS.example.md 文件包含一个可选策略,指示 OpenCode 在回答有关文档的问题之前查询此 MCP 服务器。你可以将其内容整合到项目的 AGENTS.md 文件中。

MCP 工具

工具

功能

list_documents

列出 DOCS/ 下支持的文件,排除 DOCS/mdDB/。

ingest_document

转换并索引一个文件。设置 force=true 会重复转换。

ingest_all_documents

同步所有源文档并跳过未更改的文件。

search_documents

执行语义搜索并从磁盘返回完整的 Markdown 章节。

read_markdown_section

按层次路径读取特定章节。

index_status

报告已索引的文档和分块数量。

在 OpenCode 中使用 MCP 服务器

将源文档放在 DOCS/ 下,但绝不要放在 DOCS/mdDB/ 下。然后你可以使用如下请求:

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.

扩展检索

search_documents 接受 query、一个 1 到 20 之间的 top_k 值,以及可选的 document_name。在内部,它会从 ChromaDB 请求额外结果,这样同一章节的多个分块就不会占据每个结果位置。然后它会移除重复的章节,并返回最多 top_k 个不同的章节。

每个结果都包含 context,即在查询时从磁盘读取的完整章节。index_is_current 指示 Markdown 文件是否仍具有与索引时相同的哈希。如果此值为 false,请运行 ingest_document 或 ingest_all_documents。当源文档未更改时,系统会重新索引现有的 Markdown,而无需再次运行 Marker。

转换和公式

Marker 会输出格式化的表格和由 $$ 分隔的 LaTeX 公式。默认模式是 balanced,当表格、OCR 和数学保真度是优先事项时,该模式很合适。在 CPU 或 Apple Silicon 系统上,可通过以下方式降低处理成本:

"DOC_RAG_MARKER_MODE": "fast"

对于扫描文档或无法识别的文本:

"DOC_RAG_FORCE_OCR": "true"

若要通过兼容的 LLM 服务使用 Marker 可选的混合校正:

"DOC_RAG_USE_LLM": "true"

最后一个选项需要凭据以及 Marker 支持的服务。正常 MCP 服务器运行不需要它。

环境变量

变量

默认值

描述

DOC_RAG_PROJECT_ROOT

.

当前打开项目的根目录。

DOC_RAG_SOURCE_DIR

DOCS

源文档目录;排除 DOCS/mdDB/。

DOC_RAG_MARKDOWN_DIR

DOCS/mdDB

完整 Markdown 存储目录。

DOC_RAG_CHROMA_DIR

DOCS/mdDB/.chroma

本地 ChromaDB 持久化目录。

DOC_RAG_COLLECTION

document_markdown

ChromaDB 集合名称。

DOC_RAG_CHUNK_MAX_CHARS

2400

每个分块的目标大小。

DOC_RAG_MARKER_MODE

balanced

Marker 的 balanced 或 fast 模式。

DOC_RAG_FORCE_OCR

false

强制对整个文档进行 OCR。

DOC_RAG_USE_LLM

false

启用 Marker 的混合 LLM 校正。

安全性和一致性

服务器会拒绝不支持的扩展名、.. 路径遍历、DOCS/ 之外的源、DOCS/mdDB/ 内部的任何源,以及 DOCS/mdDB/ 之外的 Markdown 路径。存储在 ChromaDB 中的路径在未经再次验证之前绝不会被使用。Markdown 写入是原子的,索引替换仅限于相应的文档。

如果同一目录中的两个文件具有相同的基本名称,例如 manual.pdf 和 manual.docx,两者都会生成 manual.md。服务器会检测到此冲突,并要求在写入或索引之前重命名其中一个源文件。

测试

单元测试不会加载 Marker 或 ChromaDB。它们验证层次化分段、表格和公式的保留、章节扩展以及路径保护:

PYTHONPATH=src python -m unittest discover -s tests -v

你还可以使用以下命令检查完整源代码树的语法:

python -m compileall -q src tests

许可证

本项目根据 MIT License 分发。Marker 的代码使用 Apache-2.0 License,其模型权重使用单独的许可证。在进行大规模商业使用之前,请查阅 Marker 的条款。

Available Tools

6 tools
index_statusA

Show indexed documents, Markdown paths, and chunk counts.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNo
document_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
section_pathYes
document_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
document_nameNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 6 tool updatesv0.1.0
    • First observedindex_status
    • First observedingest_all_documents
    • First observedingest_document
    • First observedlist_documents
    • First observedread_markdown_section
    • First observedsearch_documents

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Privacy-first local document search using semantic search. Runs entirely on your machine with no cloud services, supporting PDF, DOCX, TXT, and Markdown files.
    9
    4,493 npm
    412
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    1
    MIT