UNPKG

@holder-mcp/local-knowledge-base

Version:

Holder公司本地知识库MCP客户端,提供项目文档检索、模块信息查询和架构信息获取等工具

138 lines 4.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KNOWLEDGE_BASE_TOOLS = void 0; /** * 知识库MCP工具定义 */ exports.KNOWLEDGE_BASE_TOOLS = [ { name: "queryKnowledgeBase", description: "根据用户查询从指定项目的知识库检索相关信息,包括项目文档、设计文档和历史功能逻辑等。支持自然语言查询。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" }, query: { type: "string", description: "查询内容" }, topK: { type: "integer", description: "返回结果数量", default: 5 } }, required: ["projectName", "query"] } }, { name: "getModuleInfo", description: "检索指定项目中特定模块或功能的历史逻辑和设计规范。输入项目名称和模块名称获取相关文档。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" }, moduleName: { type: "string", description: "模块名称" } }, required: ["projectName", "moduleName"] } }, { name: "getArchitectureInfo", description: "获取指定项目的架构信息和设计模式,包括系统架构图、技术选型和设计原则等。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" } }, required: ["projectName"] } }, { name: "getKnowledgeBaseStats", description: "获取指定项目知识库的统计信息,包括文档数量、类型分布、索引状态等。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" } }, required: ["projectName"] } }, { name: "searchCodeDocumentation", description: "专门搜索指定项目中代码相关的文档和实现细节,包括API文档、代码注释、实现逻辑等。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" }, codeQuery: { type: "string", description: "代码查询内容" } }, required: ["projectName", "codeQuery"] } }, { name: "rebuildProjectIndex", description: "重建指定项目的知识库索引。会扫描指定的文档源目录,收集项目文档并上传到服务端重新建立索引。如果未指定documentPaths,将使用MCP配置中的默认路径。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" }, documentPaths: { type: "array", items: { type: "string" }, description: "文档源目录路径列表,如 ['./docs', './src', './README.md']。可选,未指定时使用MCP配置中的默认路径。" } }, required: ["projectName"] } }, { name: "uploadProjectDocuments", description: "上传项目文档到服务端。扫描指定目录,收集文档内容并批量上传到服务端建立索引。如果未指定documentPaths,将使用MCP配置中的默认路径。", inputSchema: { type: "object", properties: { projectName: { type: "string", description: "项目名称" }, documentPaths: { type: "array", items: { type: "string" }, description: "文档源目录路径列表。可选,未指定时使用MCP配置中的默认路径。" } }, required: ["projectName"] } }, ]; //# sourceMappingURL=tools.js.map