ateng-mcp-server-rag
v1.0.0基于 Python 与 FastMCP 构建的高性能检索增强生成 (RAG) 模型上下文协议 (MCP)…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
health_check
检查 RAG MCP 服务基础运行状态。 Returns: dict[str, str]: 包含服务状态、名称与版本的键值对字典。
rag_list_kbs
枚举所有已创建的知识库清单及其文档数、切片统计与更新时间。 Returns: list[dict[str, Any]]: 包含各知识库完整元数据的字典列表
rag_doctor
全维自检诊断探针,检查存储引擎连通性、本地模型配置、磁盘占用与系统环境。 Returns: dict[str, Any]: 结构化诊断报告
rag_search
在指定知识库或跨多个知识库中执行向量语义检索与原生 FTS 倒排混合检索(RRF 融合)。 Args: kb_name: 目标知识库名称,支持单库名称、知识库列表(如 ["docs", "code"])或 "*" 跨全库召回 query: 检索查询文本 top_k: 返回相似切片的最大数量(默认为 5) threshold: 相似度截断阈值,过滤掉低于此分数的切片(范围 0.0 ~ 1.0) keyword: 可选的精准关键词,切片正文必须包含此词(大小写无关) metadata_filter: 可选的元数据字典…
| Parameter | Type | Description |
|---|---|---|
kb_name * | ||
query * | string | |
expand_context | integer | |
keyword | ||
metadata_filter | ||
threshold | number | |
top_k | integer |
rag_query_with_context
检索知识库相关上下文并组装为带来源引用的 Markdown 增强提示词。 Args: kb_name: 目标知识库名称(支持单库名、知识库名称列表或通配符 "*" 跨库检索) query: 检索查询问题或主题 top_k: 返回参考切片的最大数量(默认为 5) threshold: 相似度截断阈值,过滤掉低于此分数的切片 keyword: 可选的精准关键词 metadata_filter: 可选的元数据字典过滤条件 expand_context: 邻近上下文窗口扩展步数(默认 0 不展开,允许安全范å…
| Parameter | Type | Description |
|---|---|---|
kb_name * | ||
query * | string | |
expand_context | integer | |
keyword | ||
metadata_filter | ||
threshold | number | |
top_k | integer |
rag_create_kb
创建新的知识库命名空间与底层向量存储集合。 Args: name: 知识库名称,全局唯一标识(仅限字母、数字、下划线、连字符) description: 知识库的详细描述说明信息 owner: 知识库所属创建者标识,默认 ``"default"`` visibility: 知识库可见性范围(``"public"`` 或 ``"private"``),默认 ``"public"`` Returns: dict[str, Any]: 创建结果状态与说明
| Parameter | Type | Description |
|---|---|---|
name * | string | |
description | string | |
owner | string | |
visibility | string |
rag_clear_kb
清空指定知识库中的所有文档与切片数据,但保留知识库本身的基础配置与元数据。 Args: name: 待清空的知识库名称 Returns: dict[str, Any]: 清空结果与状态说明
| Parameter | Type | Description |
|---|---|---|
name * | string |
rag_delete_kb
物理销毁指定知识库及其关联的所有文档元数据与向量索引集合。 Args: name: 待删除的知识库名称 Returns: dict[str, Any]: 删除结果与状态说明
| Parameter | Type | Description |
|---|---|---|
name * | string |
rag_delete_document
从指定知识库中物理删除特定文档及其所有切片与向量索引。 支持按文档 ID、标题或文件路径精确匹配。 Args: kb_name: 目标知识库名称 doc_id: 待删除的文档 ID、标题或文件路径 Returns: dict[str, Any]: 删除操作结果状态字典
| Parameter | Type | Description |
|---|---|---|
doc_id * | string | |
kb_name * | string |
rag_index_text
对单段纯文本内容进行切片、计算高维向量嵌入并持久化索引到指定知识库中。 支持基于 SHA-256 内容指纹校验的幂等更新: - 若相同 title 的文档内容未变动,秒级跳过; - 若内容发生修改,原子删除旧切片并插入新切片。 Args: kb_name: 目标知识库名称 text: 待索引的正文纯文本内容 title: 文档标题或唯一标识(在知识库中作为 doc_id) metadata: 可选的附加结构化元数据(标签、分类、作者等) archive_remote_images: å�…
| Parameter | Type | Description |
|---|---|---|
kb_name * | string | |
text * | string | |
title * | string | |
archive_remote_images | ||
extract_images | boolean | |
metadata |
rag_index_file
摄取本地单个文件,自动识别文件格式并进行结构感知切片、向量嵌入与持久化索引。 支持 SHA-256 内容指纹校验与幂等更新(若文件未修改则秒级跳过)。 Args: kb_name: 目标知识库名称 file_path: 本地文件绝对或相对路径 metadata: 可选的附加结构化元数据(标签、分类等) archive_remote_images: 单次覆盖是否归档远程外链图片;为 ``None`` 时沿用全局配置 extract_images: 是否提取并转写文档图片资产,默认 ``True``(为 ``False`` æ…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
kb_name * | string | |
archive_remote_images | ||
background | boolean | |
extract_images | boolean | |
metadata |
rag_index_directory
批量扫描并摄取本地目录下的所有文件,支持递归遍历与 max_files 超时防御截断。 Args: kb_name: 目标知识库名称 dir_path: 目标目录绝对或相对路径 glob_pattern: 匹配文件模式(默认为 "**/*") max_files: 目录文件摄取上限,防止大目录导致 MCP 响应超时(默认 200) recursive: 是否递归扫描子目录(默认 True) archive_remote_images: 单次覆盖是否归档远程外链图片;为 ``None`` 时沿用全局配置 extract_images: 是否提取并转写文档…
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | |
kb_name * | string | |
archive_remote_images | ||
background | boolean | |
extract_images | boolean | |
glob_pattern | string | |
max_files | integer | |
recursive | boolean |
rag_index_url
通过 HTTP 请求抓取在线网页或在线文档,清洗 HTML 视觉噪点并进行向量索引。 支持 SHA-256 内容指纹校验与幂等跳过,并具备网络超时与异常防护。 Args: kb_name: 目标知识库名称 url: 目标网页或在线文档的完整 URL(必须以 http:// 或 https:// 开头) metadata: 可选的附加结构化元数据字典 archive_remote_images: 单次覆盖是否归档远程外链图片;为 ``None`` 时沿用全局配置 extract_images: 是否提取并转写页面图片资产,默认 ``True``…
| Parameter | Type | Description |
|---|---|---|
kb_name * | string | |
url * | string | |
archive_remote_images | ||
extract_images | boolean | |
metadata |
rag_get_task_status
查询后台异步文档摄取任务的执行进度、状态与最终结果。 Args: task_id: 由 ``rag_index_file(..., background=True)`` 或 ``rag_index_directory(..., background=True)`` 返回的后台任务唯一标识。 Returns: dict[str, Any]: 包含任务状态(``pending`` / ``running`` / ``completed`` / ``failed``)、 当前进度、结果或异常说明的字典。
| Parameter | Type | Description |
|---|---|---|
task_id * | string |