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 を生成します。抽出された画像は instrument_assets/ のMarkdownファイルの隣に保存され、リンクは相対パスに書き換えられます。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によって設定されたキャッシュを使用します。初期プロセスには時間がかかり、数ギガバイトを消費する場合があります。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 ファイルには、ドキュメントに関する質問に答える前にこのMCPサーバーにクエリを実行するようOpenCodeに指示するオプションのポリシーが含まれています。その内容をプロジェクトの AGENTS.md ファイルに組み込むことができます。

MCPツール

ツール

機能

list_documents

DOCS/ 配下のサポート対象ファイルを一覧表示します。DOCS/mdDB/ は除外されます。

ingest_document

1つのファイルを変換してインデックス化します。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 を実行します。ソースドキュメントが変更されていない場合、システムはMarkerを再度実行せずに既存のMarkdownを再インデックス化します。

変換と数式

Markerは、$$ で区切られた整形された表とLaTeX数式を出力します。デフォルトモードは balanced で、表、OCR、数学的な忠実度が優先される場合に適しています。CPUまたはApple Siliconシステムでは、処理コストを削減します:

"DOC_RAG_MARKER_MODE": "fast"

スキャンされたドキュメントや読み取れないテキストの場合:

"DOC_RAG_FORCE_OCR": "true"

Markerのオプションのハイブリッド補正を互換性のあるLLMサービスを通じて使用する場合:

"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の書き込みはアトミックであり、インデックスの置き換えは対応するドキュメントに限定されます。

同じディレクトリに同じベース名の2つのファイルがある場合(manual.pdf と manual.docx など)、両方とも manual.md を生成します。サーバーはこの衝突を検出し、書き込みまたはインデックス化の前にソースファイルの1つを名前変更する必要があります。

テスト

単体テストはMarkerまたはChromaDBをロードしません。階層セグメンテーション、表と数式の保持、セクションの展開、パス保護を検証します:

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

完全なソースツリーの構文を確認することもできます:

python -m compileall -q src tests

ライセンス

このプロジェクトはMITライセンスの下で配布されています。MarkerはコードにApache-2.0ライセンスを使用し、モデルの重みには別のライセンスを使用します。大規模な商用利用の前に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