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가 구성한 캐시를 사용합니다. 초기 프로세스는 시간이 걸릴 수 있으며 수 기가바이트를 소비할 수 있습니다. DOCX, PPTX, EPUB 문서에는 marker-pdf[full] 변형이 필요하며, 이는 이미 pyproject.toml에 포함되어 있습니다.

OpenCode 구성

프로젝트 루트의 opencode.json 또는 opencode.jsonc 파일에 opencode.example.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를 실행하세요. 소스 문서가 변경되지 않은 경우 시스템은 Marker를 다시 실행하지 않고 기존 Markdown을 다시 인덱싱합니다.

변환 및 수식

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 라이선스로 배포됩니다. 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