scholar-rag-mcp
scholar-rag-mcp
ステータス: プレビューリリース (v0.1.0)。 インターフェースとストレージレイアウトは将来のバージョンで変更される可能性があります。
scholar-rag-mcp は、公開可能な学術論文ナレッジベースMCPツールです。PDFフォルダを指定すると、実際の解析パイプライン(MinerU)を通じて各論文を取り込み、メタデータを正規化し、セクション構造を注釈し、テキストをチャンク化して埋め込み、すべてをQdrantに保存します。その後、エージェント(またはあなた)は、チャンクのセマンティック検索、PubMedスタイルのドキュメントクエリ、セクションごとの全文読み取り、個別論文の追加・削除、ナレッジベースの管理を、stdio上の11個のMCPツールを通じて行えます。埋め込み、注釈、再ランキングは、OpenAI互換のモデルサービス(vLLM)上で実行され、プロセス内フォールバックも備えています。
Features
実際の取り込みパイプライン: MinerU PDF解析(python/cli/apiバックエンド) -> メタデータ抽出(ローカルヒューリスティック、CrossRef、オプションのGROBID) -> クリーニング -> セクション注釈 -> 決定的チャンク化(設定可能な300/1500/100文字) -> 埋め込み。
大規模な高速検索: 埋め込みによる一次パス + クロスエンコーダー再ランク、Qdrantインデックス内で評価されるオプションのメタデータフィルタリング(
doc_id、section、year、journal、...)。100kチャンクのp95クエリレイテンシ < 1秒(docs/perf-report.mdを参照)。非同期ジョブ:
create_kb/add_documentはバックグラウンドジョブであり、進捗はget_jobで照会できます。再起動しても安全です(中断されたジョブは回復され、再実行時にスキップされます)。コンテキストに安全な読み取り: ハードなサイズ上限付きのページ分割された
get_document_text。アウトラインを先に、ページはオンデマンドで。stdio上の11個のMCPツール:
list_kbs、create_kb、delete_kb(2段階)、add_document、remove_document、get_document、get_document_text、list_documents、search_documents、search_chunks、get_job。自己完結型ストレージ: ナレッジベースは単一のデータディレクトリ(
~/.scholar-rag)の下に置かれます。Qdrantは自動起動(単一バイナリ、バージョン固定)されるか、外部インスタンスに接続されます。
Related MCP server: RAG MCP Server
Installation
pixi が必要です。リポジトリのルートから:
pixi install # installs the default environmentこのプロジェクトは3つのpixi環境を定義しており、それぞれ異なる目的を提供します:
Environment | Purpose |
| コアランタイム + 開発ツール(pytest/ruff/mypy)。MCPサーバーとすべてのスクリプトをここで実行します。 |
| MinerU( |
| プロセス内ローカルモデルバックエンド用にtorch/transformersを追加します(初回使用時にモデルウェイトのダウンロードにフォールバックします)。 |
組み込みのdoctorで環境を検証します:
pixi run python scripts/doctor.pyModel deployment
環境('chat'、'embed'、'rerank' クライアント)は、OpenAI互換のHTTPエンドポイントを想定しています。scripts/serve_models.sh は、リファレンスモデルセット用に3つのvLLMインスタンスを起動します:
Service | Model | Port |
chat | Qwen3.5-0.8B | 8101 |
embed | jina-embeddings-v5-text-small | 8102 |
rerank | jina-reranker-v3.5 | 8103 |
# point *_MODEL at your local model directories, then:
bash scripts/serve_models.shSCHOLAR_RAG_CHAT_MODEL、SCHOLAR_RAG_EMBED_MODEL、SCHOLAR_RAG_RERANK_MODEL は必須です。いずれかが未設定の場合、スクリプトはそれらを列挙したメッセージを表示して終了します。各値はローカルのHuggingFaceモデルディレクトリへの絶対パスである必要があります。vLLMは各モデルをディレクトリのベース名と等しい短い名前で提供するため、クライアント設定ではその短い名前を使用する必要があります(提供される名前はもはやフルパスと等しくありません)。.env.example 内の /path/to/... プレースホルダーをそれに応じて置き換えてください。ポート(CHAT_PORT/EMBED_PORT/RERANK_PORT)とGPU IDは、動作するデフォルト値を持つオプションのままです。
スクリプトは、これらのモデルで検証された正確なvLLMフラグを固定します(Jina埋め込みモデルはカスタムコードのため --trust-remote-code が必要です。再ランカーはデフォルトタスクで実行され、追加フラグは不要です)。モデルの読み込みには数分かかります。スクリプトは3つすべてが応答するまでヘルスチェックをポーリングします。
最小環境
.env.example から始めて、少なくともモデルエンドポイントを設定します(serveスクリプトが公開する短い名前を使用します。これは各モデルディレクトリのベース名と等しいです):
SCHOLAR_RAG_DATA_DIR=~/.scholar-rag
SCHOLAR_RAG_QDRANT_STORAGE_DIR=~/.local/share/scholar-rag/qdrant
SCHOLAR_RAG_CHAT_BASE_URL=http://127.0.0.1:8101/v1
SCHOLAR_RAG_CHAT_MODEL=Qwen3.5-0.8B
SCHOLAR_RAG_EMBED_BASE_URL=http://127.0.0.1:8102/v1
SCHOLAR_RAG_EMBED_MODEL=jina-embeddings-v5-text-small
SCHOLAR_RAG_RERANK_BASE_URL=http://127.0.0.1:8103/v1
SCHOLAR_RAG_RERANK_MODEL=jina-reranker-v3.5埋め込みモデルの次元は、kb作成時に kb_meta.json に記録されます。そのため、後で埋め込みモデルを変更するには新しいkbが必要です。
MCPクライアントのセットアップ
サーバーのエントリポイントを直接起動して、動作することを確認します:
pixi run scholar-rag-mcpClaude (Claude Desktop / claude CLI)
{
"mcpServers": {
"scholar-rag-mcp": {
"command": "pixi",
"args": ["run", "scholar-rag-mcp"]
}
}
}opencode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"scholar-rag-mcp": {
"type": "local",
"command": ["pixi", "run", "scholar-rag-mcp"]
}
}
}ツール
Tool | Purpose |
| ドキュメント/チャンク数とステータスを持つナレッジベースを一覧表示します。 |
| フォルダ内のすべてのPDFを新しいkbに非同期で取り込みます( |
| 2段階のkb削除(下記参照)。 |
| 単一のPDFを既存のkbに非同期で取り込みます( |
| 1つのドキュメントを同期的に削除します(Qdrantポイント + カタログ + ファイル)。 |
| ドキュメントの概要: メタデータ、アブストラクト、セクションアウトライン、合計サイズ。 |
| 1つのドキュメントまたは単一セクションのページ分割された全文読み取り。 |
| kb内のドキュメントをページ分割して閲覧します。 |
| PubMedスタイルのドキュメントレベル検索(FTS + タイトル/著者/ジャーナル/年)。 |
| メタデータフィルターとembed+rerankスコアによるセマンティックチャンク検索。 |
| バックグラウンドジョブのステータス/進捗/結果/経過時間を照会します。 |
データレイアウト
<data_dir>/ # SCHOLAR_RAG_DATA_DIR, default ~/.scholar-rag
├── kbs/<kb_name>/
│ ├── kb_meta.json # dimension, chunk config, schema version
│ ├── catalog.sqlite3 # documents / authors / keywords / chunks + FTS5
│ └── documents/<doc_id>/ # source.pdf, full_text.md, sections.json
├── cache/parse/ # MinerU markdown cache, keyed by content hash
├── cache/resolver/ # annotation resolver cache, keyed by content hash
├── jobs.sqlite3 # async job history
└── bin/ # auto-downloaded Qdrant binary (v1.12.5)Qdrantストレージは data_dir の外側、QDRANT_STORAGE_DIR(デフォルトは ~/.local/share/scholar-rag/qdrant)に置かれます。これはローカルファイルシステム上にある必要があり、9p/ネットワークマウントでは動作しません。
2段階のkb削除
delete_kb は、誤った引数による最初の呼び出しで誤って削除することはありません:
delete_kb(kb="...")を呼び出します - kb統計と10分間有効なconfirm_tokenを返します。delete_kb(kb="...", confirm_token="<token>")を呼び出して、Qdrantコレクション、kbディレクトリ、およびそのジョブ履歴を実際に削除します。
開発
pixi run lint # ruff check src tests
pixi run typecheck # mypy src
pixi run test # pytest (unit + integration, no e2e/perf)
pixi run -e mineru pytest tests/e2e/smoke.py -v -m e2e # real end-to-end smoke
python tests/perf/bench_query.py # query latency benchmark (writes docs/perf-report.md)リリースノート
既知の制限とアップグレードの指針については、docs/handoffs/release-notes-v0.1.0.md を参照してください。
繰り返し述べる価値のある既知の制約:
Qdrantはv1.12.5に固定されています - これはglibc 2.35で動作する最高バージョンです。自動起動時に初回使用でダウンロードされます。glibc >= 2.38では新しいバージョンを実行できますが、このリリースではデータ形式は古いkbとの前方互換性がありません。
MinerUは独自のpixi環境で実行されます。そのtransformersバージョンがvLLMのものと相互排他的であるためです。したがって、PDF解析は
pixi run -e mineruを優先します。MinerUのウェイト(~3.2 GB)は、最初の解析時に
~/.cache/modelscope/にダウンロードされます。メタデータのタイトルヒューリスティック: タイトルは、MinerUマークダウンが
#/##見出しで始まる場合にのみローカルで取得されます。そのため、先頭の## Abstractなどがタイトルとして誤読される可能性があります。これはローカルヒューリスティックメタデータ層のみに影響します。CrossRef層(DOIが見つかった場合に使用)は通常これを修正します。ツールディスパッチ: ツールへの未知の追加引数は、拒否されるのではなく黙って無視されます。
9pストレージ制限: Qdrantストレージはローカルファイルシステム上にある必要があります。
Available Tools
11 toolsadd_documentA
Asynchronously ingest a single PDF into an existing kb; returns a job_id.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| pdf_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden; it does disclose the key fact that ingestion is asynchronous and returns a job_id. However, it does not explain job lifecycle, whether the operation is idempotent, or what failure/error behavior the agent should expect.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence front-loads the essential behavior and return type with no filler; every element earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with an output schema, the description is mostly sufficient, but it misses the async workflow link: an agent is told it gets a job_id but not advised to poll get_job or that ingestion completion is part of that flow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It maps kb to an existing target and pdf_path to a single PDF, but adds little beyond the self-explanatory parameter names and leaves path format/kb identifier details unspecified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description names a specific verb ('ingest'), object ('a single PDF'), destination ('existing kb'), and execution mode ('asynchronously'), while noting the job_id return. This clearly separates it from retrieval, removal, search, and KB-lifecycle sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'into an existing kb' implies this is only appropriate when the target kb already exists, but there is no explicit when/when-not guidance or link to alternatives such as create_kb (if the kb doesn't exist) or get_job (to track the returned job_id).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_kbA
Asynchronously create a kb from all PDFs in a folder; returns a job_id.
| Name | Required | Description | Default |
|---|---|---|---|
| kb_name | Yes | ||
| chunk_max | No | ||
| chunk_min | No | ||
| folder_path | Yes | ||
| chunk_overlap | No | ||
| skip_existing | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral burden. It usefully discloses that creation is asynchronous and that a job_id is returned, which is essential operational information. However, it does not mention failure behavior, required access to the folder, side effects, or that the job can be tracked via get_job.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence packs the core purpose, the source scope, the async nature, and the return value without any filler. Every word earns its place and the most decision-relevant information comes first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For the required parameters, the description plus schema names are sufficient to make a basic call. However, with 6 parameters, no annotations, and no mention of chunking semantics or job monitoring via get_job, the description is only minimally complete for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only clarifies the meaning of folder_path (a folder of PDFs) and loosely implies kb_name names the KB. The chunk_max, chunk_min, chunk_overlap, and skip_existing parameters receive no semantic explanation, leaving a significant gap for a six-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('create'), a clear resource ('kb'), a precise source scope ('all PDFs in a folder'), and a notable execution trait (async + job_id). This distinguishes it from sibling tools like add_document, which handles individual documents, and delete_kb, which removes a KB.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use the tool: when you want to build a knowledge base from a bulk set of PDFs in a folder rather than adding documents one by one. It does not explicitly name alternatives or state when not to use it, but the folder-scoped wording is contextually strong enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_kbB
Two-phase kb deletion: preview and confirm token, else full deletion.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| confirm_token | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden. It does disclose the key behavior: deletion requires a two-phase preview-and-confirm token flow. However, it omits consequences of an invalid token, irreversibility, permissions, or whether the first call actually deletes anything.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one short sentence with no filler and is front-loaded with the key operation. The ambiguous closing phrase 'else full deletion' slightly detracts from an otherwise efficient structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description captures the essential two-phase workflow but leaves operational details unclear, such as the exact flow between preview and confirmation and the meaning of 'full deletion.' The presence of an output schema helps, but for a destructive tool with no annotations, more explicit guidance would be valuable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It partially does by explaining confirm_token as the confirmation mechanism, but it does not explain what kb should contain or how the token is obtained. The meaning is mostly inferred from the tool name and context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the operation as knowledge base deletion and names the two-phase workflow. The trailing 'else full deletion' is ambiguous about when preview vs. full deletion occurs, but the core purpose is still understandable and distinct from sibling document tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies a two-step usage pattern: first preview, then confirm with a token. It does not explicitly state when to use this tool over remove_document or how the phases should be sequenced, leaving some inference to the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_documentB
Overview of a document: metadata, abstract, section outline and total character count.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| doc_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of disclosing behavior. It does disclose the output composition, which is useful, and 'get' implies a read operation. However, it does not state whether the operation is read-only, what happens on missing documents, or whether it excludes full text beyond the term 'Overview'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence where every phrase adds meaning. It starts with the core purpose and then lists concrete contents without any filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The presence of an output schema covers return-value documentation, and the tool is relatively simple. Still, with no usage guidance and no parameter semantics in the description, an agent selecting between get_document and get_document_text has incomplete context to make a confident choice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain what kb or doc_id mean beyond their generic names and titles. An agent must infer that kb identifies a knowledge base and doc_id identifies the target document, which is not explicitly communicated.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific operation, 'Overview of a document', and enumerates exactly what is returned: metadata, abstract, section outline, and total character count. This clearly distinguishes it from sibling get_document_text, which presumably returns full text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit when-to-use or when-not-to-use guidance and does not mention alternatives such as get_document_text or search_documents. The intended use case is only implied by the word 'Overview', leaving the agent to infer which sibling tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_document_textB
Paginated reading of the full text or a single section of a document.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| page | No | ||
| doc_id | Yes | ||
| section | No | ||
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It does disclose that the operation is a read and that pagination is involved, plus the full-text-vs-section behavior. However, it omits important behavioral details such as how pagination terminates, what page_size represents, what happens for missing sections, and whether only the readable text is returned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, direct sentence that front-loads the primary behavior and includes the most important scope distinction. There is no filler or redundant restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema and output schema provide some structural context, but the description remains thin for a 5-parameter tool with no annotations. It gives a reasonable high-level orientation, but does not cover pagination mechanics, parameter usage, or alternative tool selection, so it is not fully complete for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description needed to explain the parameters, but it does not mention kb, doc_id, page, or page_size explicitly. It hints at the section parameter ('a single section') and at pagination generally, but it does not clarify parameter relationships, defaults, or constraints enough to compensate for the absent schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('reading'), the resource ('text of a document'), and a key scope distinction ('full text or a single section'). It is specific enough to convey the core purpose, though it does not explicitly distinguish itself from the sibling get_document tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given about when to use this tool versus alternatives like get_document or search_chunks. There is no mention of prerequisites, typical use cases, or when to prefer another sibling, so an agent must infer the appropriate selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_jobA
Query the status, progress and result of a background job.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must carry behavioral transparency on its own. It does convey that the operation is a read via 'Query' and that it returns status/progress/result, but it does not disclose what happens if the job is not found, whether it returns immediately, or whether it can be called repeatedly. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with zero filler. Every word carries meaning, covering the verb, resource, and expected output fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read tool with an output schema, the description is mostly sufficient: it states the operation's purpose and the schema handles the argument definition. It only lacks explicit guidance on when job polling is appropriate, but that is a usage nuance rather than a blocking gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description does not mention job_id at all, so it fails to compensate for the low coverage. However, the parameter's name ('job_id') and title ('Job Id') make its purpose self-evident, so the lack of additional meaning is a minor but real gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Query' and identifies the resource as 'a background job', then enumerates exactly what is returned: status, progress, and result. This clearly distinguishes it from sibling tools focused on documents and KBs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when a caller needs job status or progress, but it doesn't state when to use it versus alternatives, mention polling behavior, or explain its relationship to the document/KB tools. Usage context is left to the agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_documentsC
Paginated browse of documents in a kb.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| page | No | ||
| sort | No | added | |
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It only reveals pagination; it does not state read-only status, default sort order, error behavior on missing kb, or whether results are limited to metadata. Minimal behavioral context is provided.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no filler, front-loading the verb 'browse'. It is appropriately short for a list operation, though it sacrifices some informational depth.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, 0% schema description coverage, and no annotations, this description is too sparse to be complete. The output schema covers return values, but parameter meanings, usage context, and behavioral specifics are largely absent. An agent would need to infer too much.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for parameter meanings. It clarifies that kb is a knowledge base and hints at pagination, but provides no detail on 'sort', 'page', or 'page_size' semantics beyond what the schema's titles already show.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('browse') and resource ('documents in a kb'), with pagination noted. It is distinguished from siblings like get_document or search_documents by the word 'browse', though it doesn't specify whether it returns metadata or full content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives. The word 'browse' implies a listing use case, but there are no exclusions, prerequisites, or comparisons to search_documents or get_document.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_kbsA
List all knowledge bases with metadata and status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It states that the tool returns all KBs and includes metadata and status, which gives some idea of the operation's scope and output. It does not mention whether the operation is read-only, whether it might be paginated, or any rate limits, though 'list' inherently suggests a non-mutating read. Lacks detail on behavioral edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, compact sentence that front-loads the verb and object, then adds the output characteristics. Every word earns its place, and there is no redundant verbiage or repetition of schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-argument list operation with an output schema, the description fully covers what the tool does, at what scope, and what the response contains. No additional context about return values is needed because the output schema exists. The tool is simple enough that nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is empty, so there is nothing for the description to clarify on a per-parameter basis. The phrase 'all knowledge bases' adds a useful scope clarification, confirming there are no filter or pagination parameters. This meets the baseline expectation for a 0-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('knowledge bases') and clearly states the scope ('all') and the content returned ('metadata and status'). This distinguishes it from sibling tools like create_kb and delete_kb, as well as document-specific tools, without needing to inspect schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose strongly implies when to use the tool: when you need an overview of all knowledge bases and their state. However, there is no explicit guidance about when not to use it or how it compares to alternatives such as get_document or search_documents. For a simple list operation, the implied usage is acceptable but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remove_documentB
Synchronously delete a document from qdrant, catalog and disk.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| doc_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It does communicate the destructive scope and that deletion is synchronous across multiple stores, but it does not mention whether the operation is irreversible, what happens if the document does not exist, or permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one efficient, front-loaded sentence. It conveys the operation, the synchronous behavior, and the affected storage locations without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with no annotations and two required parameters, the description is not complete enough. It omits parameter semantics, safety caveats, and behavior in failure cases, though an output schema is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain either parameter. 'kb' and 'doc_id' are left entirely to inference from their names, with no guidance on formats, relationships, or how to obtain valid values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'delete a document' along with the concrete stores affected: qdrant, catalog, and disk. This clearly differentiates it from document retrieval/search tools and from KB-level deletes like delete_kb.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. Usage is only implied by the name and the verb 'delete,' with no context about preparing for the operation or handling the irreversibility.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_chunksA
Semantic search over chunk bodies of a kb with metadata filters, embedding and rerank scores.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| query | Yes | ||
| top_k | No | ||
| min_score | No | ||
| metadata_filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden, and it discloses that the operation is semantic, filterable by metadata, and produces embedding and rerank scores. It does not overstate side effects; search implies a read operation. It could add detail on how filters and scores interact, but the core behavior is clearly conveyed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence that leads with the action and target and ends with scoring detail. There is no filler or repetition of schema field titles.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The presence of an output schema covers return values, but the description still leaves parameter semantics and the relationship to search_documents implicit. For a straightforward search operation the description is adequate, yet it has clear gaps around top_k/min_score and when to use this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for five otherwise undocumented parameters. Only 'metadata filters' maps directly to a parameter; kb/query semantics are implicit, and top_k/min_score are not explained at all.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb ('search'), resource ('chunk bodies of a kb'), and retrieval type ('semantic'), with metadata filtering noted. This clearly distinguishes it from sibling search_documents, which operates at document level.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'semantic search over chunk bodies' implies this is the right tool when an agent needs similarity-based retrieval over chunks, in contrast to sibling document-level tools. However, it never explicitly states when to prefer this tool over search_documents or when not to use it, so usage guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_documentsC
Document-level PubMed-style search with optional FTS query and metadata filters.
| Name | Required | Description | Default |
|---|---|---|---|
| kb | Yes | ||
| page | No | ||
| query | No | ||
| title | No | ||
| authors | No | ||
| journal | No | ||
| year_to | No | ||
| page_size | No | ||
| year_from | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It states search scope and optional filters but does not explain whether the operation is read-only, how filters combine, how pagination behaves, or what query syntax is expected. 'PubMed-style' hints at behavior but is not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no filler. Every phrase contributes to the core purpose or key capability, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 9 parameters, no annotations, and zero schema descriptions, one sentence is not enough. The output schema may cover return values, but the description omits query syntax, filter semantics, pagination behavior, and sibling selection cues, leaving significant gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds useful meaning by labeling 'query' as an FTS query and grouping title, authors, journal, and year fields as metadata filters. However, it does not clarify query syntax, filter combination logic, or the meaning of kb/page/page_size beyond their names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies 'search' as the action and 'documents' as the resource, and 'document-level' helps separate it from chunk-level searching. It does not explicitly name sibling alternatives such as list_documents, but the core purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for finding documents via full-text query and metadata filters, but it offers no explicit when-to-use guidance, no exclusions, and no comparison with search_chunks or list_documents. An agent is left to infer when this tool is the right choice.
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.
11 tool updates
v0.1.0- First observed
add_document - First observed
create_kb - First observed
delete_kb - First observed
get_document - First observed
get_document_text - First observed
get_job - First observed
list_documents - First observed
list_kbs - First observed
remove_document - First observed
search_chunks - First observed
search_documents
TDQS
Scored across 11 tools
Each tool targets a distinct resource and action: KB-level, document-level, and chunk-level operations are cleanly separated. get_document versus get_document_text, and search_documents versus search_chunks, are differentiated by granularity and description.
All tools follow a clear snake_case verb_noun pattern (get, add, remove, search, list, create, delete). The only slight abbreviation is list_kbs, but it does not break the pattern or create ambiguity.
At 11 tools, the surface is well-scoped for a RAG/knowledge-base server: KB management, document management, retrieval, and job status. Each tool corresponds to a distinct operation needed for the workflow.
The set covers the full lifecycle: KB create/list/delete, document add/get/list/remove, text reading, document- and chunk-level search, and async job tracking. There are no obvious dead ends; asynchronous operations are paired with get_job for status and results.
Maintenance
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Ingest, manage, and retrieve documents for RAG-powered AI applications
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local academic research assistant that indexes PDFs into a searchable vector library and exposes MCP tools for semantic search, claim extraction, contradiction detection, and multi-step research synthesis.-
- FlicenseNot gradedqualityDmaintenanceIndexes PDF documents into Qdrant and exposes semantic search as MCP tools, enabling RAG-based interactions with your documents.-
- FlicenseNot gradedqualityDmaintenanceEnables users to build and query a private knowledge base by uploading documents, which are embedded and stored locally, then accessible via MCP for semantic search and retrieval.-
- FlicenseAqualityBmaintenanceEnables semantic search across personal PDF paper collections with page-level citations, allowing users to query their library from any MCP-capable client.9-