scholar-rag-mcp
scholar-rag-mcp
状态:预览版(v0.1.0)。 接口和存储布局在未来的版本中可能会发生变化。
scholar-rag-mcp 是一个可发布的学术论文知识库 MCP 工具。将其指向一个 PDF 文件夹,它会通过真实的解析流水线(MinerU)摄取每篇论文,规范化元数据,标注章节结构,对文本进行分块和嵌入,并将所有内容存储在 Qdrant 中——之后,智能体(或您)可以通过 stdio 上的 11 个 MCP 工具对分块进行语义搜索、运行 PubMed 风格的文档查询、逐节阅读全文、添加/删除单篇论文以及管理知识库。嵌入、标注和重排序在 OpenAI 兼容的模型服务(vLLM)上运行,并带有进程内回退。
功能特性
真实摄取流水线:MinerU PDF 解析(python/cli/api 后端)-> 元数据提取(本地启发式、CrossRef、可选 GROBID)-> 清洗 -> 章节标注 -> 确定性分块(可配置 300/1500/100 字符)-> 嵌入。
大规模快速检索:嵌入初筛 + 交叉编码器重排序,可选的元数据过滤(
doc_id、section、year、journal等)在 Qdrant 索引内评估。10 万分块的 p95 查询延迟 < 1 秒(参见docs/perf-report.md)。异步任务:
create_kb/add_document是后台任务,可通过get_job查询进度;可安全重启(中断的任务会被恢复并在重新运行时跳过)。上下文安全的阅读:分页的
get_document_text带有硬性大小上限;先看大纲,按需翻页。stdio 上的 11 个 MCP 工具:
list_kbs、create_kb、delete_kb(两阶段)、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
安装
需要 pixi。在仓库根目录下:
pixi install # installs the default environment该项目定义了三个 pixi 环境,每个环境服务于不同的目的:
环境 | 用途 |
| 核心运行时 + 开发工具(pytest/ruff/mypy)。在此运行 MCP 服务器和所有脚本。 |
| 添加 MinerU( |
| 添加 torch/transformers 以支持进程内本地模型后端(首次使用时回退到下载模型权重)。 |
使用内置的 doctor 验证您的环境:
pixi run python scripts/doctor.py模型部署
环境('chat'、'embed' 和 'rerank' 客户端)需要 OpenAI 兼容的 HTTP 端点。
scripts/serve_models.sh 为参考模型集启动三个 vLLM 实例:
服务 | 模型 | 端口 |
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 来处理其自定义代码;重排序器以其默认任务运行,无需额外标志)。模型加载需要几分钟;脚本会轮询健康状态,直到三个模型全部响应。
最小环境
从 .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"]
}
}
}工具
工具 | 用途 |
| 列出知识库及其文档/分块数量和状态。 |
| 异步将文件夹中的每个 PDF 摄取到新 kb 中(返回 |
| 两阶段 kb 删除(见下文)。 |
| 异步将单个 PDF 摄取到现有 kb 中(返回 |
| 同步删除一个文档(Qdrant 点 + 目录 + 文件)。 |
| 文档概览:元数据、摘要、章节大纲、总大小。 |
| 分页全文阅读一个文档或单个章节。 |
| 分页浏览 kb 中的文档。 |
| PubMed 风格的文档级搜索(FTS + 标题/作者/期刊/年份)。 |
| 带元数据过滤器和嵌入+重排序分数的语义分块搜索。 |
| 查询后台任务的状态/进度/结果/耗时。 |
数据布局
<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/网络挂载。
两阶段 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 markdown 以
#/##标题开头时,才会在本地选取标题,因此开头的## 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-