@ppdocs/mcp 2.6.13 → 2.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,14 +118,14 @@ export function registerTools(server, projectId, _user) {
118
118
  return wrap(projectId, node ? JSON.stringify(node, null, 2) : '操作失败');
119
119
  });
120
120
  // 5. 搜索节点
121
- server.tool('kg_search', '关键词搜索节点,按相关度排序返回', {
121
+ server.tool('kg_search', '关键词搜索节点,按命中率排序返回', {
122
122
  keywords: z.array(z.string()).describe('关键词列表(OR逻辑)'),
123
- limit: z.number().optional().describe('返回数量(默认20)')
123
+ limit: z.number().optional().describe('返回数量(默认10)')
124
124
  }, async (args) => {
125
- const results = await storage.searchNodes(projectId, args.keywords, args.limit);
125
+ const results = await storage.searchNodes(projectId, args.keywords, args.limit || 10);
126
126
  const output = results.map(r => ({
127
127
  id: r.node.id, title: r.node.title, type: r.node.type,
128
- status: r.node.status, score: r.score.toFixed(1), matches: r.matches
128
+ status: r.node.status, hitRate: `${Math.round(r.score)}%`
129
129
  }));
130
130
  return wrap(projectId, JSON.stringify(output, null, 2));
131
131
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "2.6.13",
3
+ "version": "2.6.14",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",