mcp-probe-kit 1.8.1 → 1.10.0

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.
Files changed (59) hide show
  1. package/build/index.js +123 -578
  2. package/build/tools/add_feature.d.ts +0 -11
  3. package/build/tools/add_feature.js +19 -10
  4. package/build/tools/analyze_project.js +76 -61
  5. package/build/tools/check_deps.d.ts +1 -1
  6. package/build/tools/check_deps.js +2 -2
  7. package/build/tools/code_review.js +15 -2
  8. package/build/tools/convert.js +18 -3
  9. package/build/tools/css_order.js +55 -55
  10. package/build/tools/debug.js +14 -2
  11. package/build/tools/design2code.d.ts +2 -11
  12. package/build/tools/design2code.js +21 -4
  13. package/build/tools/detect_shell.js +15 -2
  14. package/build/tools/estimate.js +21 -4
  15. package/build/tools/explain.js +15 -2
  16. package/build/tools/fix.js +15 -2
  17. package/build/tools/fix_bug.js +24 -5
  18. package/build/tools/gen_mock.js +24 -5
  19. package/build/tools/gen_skill.d.ts +0 -3
  20. package/build/tools/gen_skill.js +21 -4
  21. package/build/tools/genapi.js +15 -2
  22. package/build/tools/genchangelog.js +18 -3
  23. package/build/tools/gencommit.js +24 -2
  24. package/build/tools/gendoc.js +18 -3
  25. package/build/tools/genpr.js +15 -2
  26. package/build/tools/genreadme.js +15 -2
  27. package/build/tools/gensql.js +15 -2
  28. package/build/tools/gentest.js +15 -2
  29. package/build/tools/genui.js +15 -2
  30. package/build/tools/init_project.js +15 -2
  31. package/build/tools/init_project_context.d.ts +0 -6
  32. package/build/tools/init_project_context.js +12 -2
  33. package/build/tools/perf.js +15 -2
  34. package/build/tools/refactor.js +15 -2
  35. package/build/tools/resolve_conflict.js +12 -1
  36. package/build/tools/security_scan.js +18 -3
  37. package/build/tools/split.js +15 -2
  38. package/build/tools/start_api.d.ts +0 -6
  39. package/build/tools/start_api.js +18 -3
  40. package/build/tools/start_bugfix.d.ts +0 -6
  41. package/build/tools/start_bugfix.js +15 -2
  42. package/build/tools/start_doc.d.ts +0 -6
  43. package/build/tools/start_doc.js +20 -3
  44. package/build/tools/start_feature.d.ts +0 -6
  45. package/build/tools/start_feature.js +18 -3
  46. package/build/tools/start_onboard.d.ts +0 -6
  47. package/build/tools/start_onboard.js +15 -2
  48. package/build/tools/start_refactor.d.ts +0 -6
  49. package/build/tools/start_refactor.js +15 -2
  50. package/build/tools/start_release.d.ts +0 -6
  51. package/build/tools/start_release.js +18 -3
  52. package/build/tools/start_review.d.ts +0 -6
  53. package/build/tools/start_review.js +15 -2
  54. package/build/utils/parseArgs.d.ts +39 -0
  55. package/build/utils/parseArgs.js +153 -0
  56. package/docs/HOW_TO_TRIGGER.html +56 -0
  57. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +449 -0
  58. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +609 -0
  59. package/package.json +1 -1
package/build/index.js CHANGED
@@ -15,786 +15,331 @@ const server = new Server({
15
15
  },
16
16
  });
17
17
  // 定义工具列表
18
+ // 注意:所有工具都支持自然语言输入!
19
+ // 用户可以直接用自然语言描述需求,无需构造复杂的 JSON 对象
20
+ // 例如:直接说 "帮我生成 commit 消息" 或 "请审查这段代码:function login() {...}"
18
21
  server.setRequestHandler(ListToolsRequestSchema, async () => {
19
22
  return {
20
23
  tools: [
21
24
  {
22
25
  name: "detect_shell",
23
- description: "检测 AI 应用环境指纹,识别是否为套壳产品;返回 JSON 检测报告;仅基于环境指纹判断,不做法律/归因结论",
26
+ description: "🎯 支持自然语言输入!可直接说'检测环境'。检测 AI 应用环境指纹,识别是否为套壳产品;返回 JSON 检测报告;仅基于环境指纹判断,不做法律/归因结论",
24
27
  inputSchema: {
25
- type: "object",
26
- properties: {
27
- nonce: {
28
- type: "string",
29
- description: "可选的随机字符串用于哈希校验,默认为 iclaude-4.5|2025-10-25|guyu|boot",
30
- },
31
- skip_network: {
32
- type: "boolean",
33
- description: "是否跳过网络探测(默认 false)",
34
- },
35
- },
36
- required: [],
28
+ type: "string",
29
+ description: "💡 支持多种输入格式:\n1) 自然语言:'检测环境' 或 '检测是否为套壳'\n2) JSON字符串:'{\"nonce\":\"...\", \"skip_network\":true}'\n3) 空字符串:使用默认配置",
37
30
  },
38
31
  },
39
32
  {
40
33
  name: "init_setting",
41
- description: "初始化 Cursor IDE 配置,写入推荐的 AI 设置到 .cursor/settings.json",
34
+ description: "🎯 支持自然语言输入!可直接说'初始化 Cursor 配置'。初始化 Cursor IDE 配置,写入推荐的 AI 设置到 .cursor/settings.json",
42
35
  inputSchema: {
43
- type: "object",
44
- properties: {
45
- project_path: {
46
- type: "string",
47
- description: "项目根目录的完整路径(默认使用当前工作区路径)",
48
- },
49
- },
50
- required: [],
36
+ type: "string",
37
+ description: "💡 支持多种输入格式:\n1) 自然语言:'初始化配置' 或 '初始化 Cursor 配置'\n2) JSON字符串:'{\"project_path\":\"/path/to/project\"}'\n3) 空字符串:使用当前工作区路径",
51
38
  },
52
39
  },
53
40
  {
54
41
  name: "init_project",
55
- description: "创建新项目结构和任务分解,按 Spec-Driven Development 方式生成需求/设计/任务文档",
42
+ description: "🎯 支持自然语言输入!可直接说'创建新项目'或描述项目需求。创建新项目结构和任务分解,按 Spec-Driven Development 方式生成需求/设计/任务文档",
56
43
  inputSchema: {
57
- type: "object",
58
- properties: {
59
- input: {
60
- type: "string",
61
- description: "项目需求描述(可以是文字描述或文件内容)",
62
- },
63
- project_name: {
64
- type: "string",
65
- description: "项目名称",
66
- },
67
- },
68
- required: [],
44
+ type: "string",
45
+ description: "💡 支持多种输入格式:\n1) 自然语言:'创建一个电商网站项目' 或 '创建博客系统'\n2) 项目需求描述:详细的功能需求文档\n3) JSON字符串:'{\"input\":\"项目需求\", \"project_name\":\"my-project\"}'",
69
46
  },
70
47
  },
71
48
  {
72
49
  name: "gencommit",
73
- description: "分析代码变更生成 Git commit 消息,支持 Conventional Commits 和 emoji;输出文本,不执行提交",
50
+ description: "🎯 支持自然语言输入!可直接说'帮我生成commit消息'或'修复了登录bug'。分析代码变更生成 Git commit 消息,支持 Conventional Commits 和 emoji;输出文本,不执行提交",
74
51
  inputSchema: {
75
- type: "object",
76
- properties: {
77
- changes: {
78
- type: "string",
79
- description: "代码变更内容(可选,默认使用 git diff)",
80
- },
81
- type: {
82
- type: "string",
83
- description: "提交类型:fixed, fix, feat, docs, style, chore, refactor, test",
84
- },
85
- },
86
- required: [],
52
+ type: "string",
53
+ description: "💡 支持多种输入格式:\n1) 自然语言:'帮我生成commit消息' 或 '修复了登录bug'\n2) git diff 输出:直接粘贴 git diff 结果\n3) JSON字符串:'{\"changes\":\"修复bug\", \"type\":\"fixed\"}'\n4) 空字符串:将自动获取 git diff",
87
54
  },
88
55
  },
89
56
  {
90
57
  name: "debug",
91
- description: "分析错误信息和堆栈,定位问题根因,输出调试策略和解决方案;仅分析定位,不修复代码",
58
+ description: "🎯 支持自然语言输入!可直接粘贴错误信息如'TypeError: Cannot read property name of undefined'。分析错误信息和堆栈,定位问题根因,输出调试策略和解决方案;仅分析定位,不修复代码",
92
59
  inputSchema: {
93
- type: "object",
94
- properties: {
95
- error: {
96
- type: "string",
97
- description: "完整错误信息,包含错误消息、堆栈跟踪、触发位置",
98
- },
99
- context: {
100
- type: "string",
101
- description: "相关代码片段、复现步骤或运行环境描述",
102
- },
103
- },
104
- required: [],
60
+ type: "string",
61
+ description: "💡 支持多种输入格式:\n1) 直接粘贴错误信息:'TypeError: Cannot read property...'\n2) 完整错误+堆栈:包含错误消息和堆栈跟踪\n3) JSON字符串:'{\"error\":\"错误信息\", \"context\":\"相关代码\"}'",
105
62
  },
106
63
  },
107
64
  {
108
65
  name: "genapi",
109
- description: "生成 API 文档(Markdown/OpenAPI/JSDoc),包含参数说明与示例;基于现有接口定义/路由/注释推断;输出文本,不修改业务代码",
66
+ description: "🎯 支持自然语言输入!可直接粘贴 API 代码。生成 API 文档(Markdown/OpenAPI/JSDoc),包含参数说明与示例;基于现有接口定义/路由/注释推断;输出文本,不修改业务代码",
110
67
  inputSchema: {
111
- type: "object",
112
- properties: {
113
- code: {
114
- type: "string",
115
- description: "API 代码(路由定义/Controller/接口函数),包含参数类型和返回值",
116
- },
117
- format: {
118
- type: "string",
119
- description: "文档格式:markdown, openapi, jsdoc(默认 markdown)",
120
- },
121
- },
122
- required: [],
68
+ type: "string",
69
+ description: "💡 支持多种输入格式:\n1) 直接粘贴 API 代码:路由定义、Controller 或接口函数\n2) 自然语言:'生成 API 文档'\n3) JSON字符串:'{\"code\":\"API代码\", \"format\":\"openapi\"}'",
123
70
  },
124
71
  },
125
72
  {
126
73
  name: "code_review",
127
- description: "审查代码质量、安全性、性能,输出结构化问题清单(severity/category/file/line/suggestion);仅分析,不自动修改代码",
74
+ description: "🎯 支持自然语言输入!可直接粘贴代码如'请审查这段代码:function login() {...}'。审查代码质量、安全性、性能,输出结构化问题清单(severity/category/file/line/suggestion);仅分析,不自动修改代码",
128
75
  inputSchema: {
129
- type: "object",
130
- properties: {
131
- code: {
132
- type: "string",
133
- description: "代码片段、文件完整内容或 git diff;支持多文件拼接",
134
- },
135
- focus: {
136
- type: "string",
137
- description: "审查重点:quality, security, performance, all(默认 all)",
138
- },
139
- },
140
- required: [],
76
+ type: "string",
77
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function login() {...}'\n2) 带说明:'请审查这段代码:...'\n3) git diff 输出\n4) JSON字符串:'{\"code\":\"代码\", \"focus\":\"security\"}'",
141
78
  },
142
79
  },
143
80
  {
144
81
  name: "gentest",
145
- description: "生成单元测试代码(Jest/Vitest/Mocha),包含边界用例和 mock;默认跟随项目现有测试框架与语言;输出代码,不运行测试",
82
+ description: "🎯 支持自然语言输入!可直接粘贴需要测试的代码。生成单元测试代码(Jest/Vitest/Mocha),包含边界用例和 mock;默认跟随项目现有测试框架与语言;输出代码,不运行测试",
146
83
  inputSchema: {
147
- type: "object",
148
- properties: {
149
- code: {
150
- type: "string",
151
- description: "需要测试的代码(函数/类/模块),包含完整签名和依赖导入",
152
- },
153
- framework: {
154
- type: "string",
155
- description: "测试框架:jest, vitest, mocha(默认跟随项目现有框架,若无法检测则 jest)",
156
- },
157
- },
158
- required: [],
84
+ type: "string",
85
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function add(a, b) {...}'\n2) 自然语言:'生成测试代码'\n3) JSON字符串:'{\"code\":\"函数代码\", \"framework\":\"jest\"}'",
159
86
  },
160
87
  },
161
88
  {
162
89
  name: "genpr",
163
- description: "生成 Pull Request 描述,包含变更摘要、影响范围、测试说明;输出文本,不创建 PR",
90
+ description: "🎯 支持自然语言输入!可直接说'生成PR描述'或粘贴 commit 历史。生成 Pull Request 描述,包含变更摘要、影响范围、测试说明;输出文本,不创建 PR",
164
91
  inputSchema: {
165
- type: "object",
166
- properties: {
167
- branch: {
168
- type: "string",
169
- description: "当前分支名称(如 feature/user-auth)",
170
- },
171
- commits: {
172
- type: "string",
173
- description: "Commit 历史(git log 输出或 commit 消息列表)",
174
- },
175
- },
176
- required: [],
92
+ type: "string",
93
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成PR描述' 或 '生成发布说明'\n2) 粘贴 commit 历史:git log 输出\n3) JSON字符串:'{\"branch\":\"feature/xxx\", \"commits\":\"...\"}'",
177
94
  },
178
95
  },
179
96
  {
180
97
  name: "check_deps",
181
- description: "检查依赖健康度(版本过期/安全漏洞/体积),输出升级建议(含潜在 breaking 风险);仅分析,不自动升级",
98
+ description: "🎯 支持自然语言输入!可直接说'检查依赖'。检查依赖健康度(版本过期/安全漏洞/体积),输出升级建议(含潜在 breaking 风险);仅分析,不自动升级",
182
99
  inputSchema: {
183
- type: "object",
184
- properties: {},
185
- required: [],
100
+ type: "string",
101
+ description: "💡 支持多种输入格式:\n1) 自然语言:'检查依赖' 或 '检查依赖健康度'\n2) 空字符串:自动检查当前项目依赖",
186
102
  },
187
103
  },
188
104
  {
189
105
  name: "gendoc",
190
- description: "生成代码注释(JSDoc/TSDoc/Javadoc),补全参数/返回值/异常/示例;输出代码,不改变逻辑",
106
+ description: "🎯 支持自然语言输入!可直接粘贴需要注释的代码。生成代码注释(JSDoc/TSDoc/Javadoc),补全参数/返回值/异常/示例;输出代码,不改变逻辑",
191
107
  inputSchema: {
192
- type: "object",
193
- properties: {
194
- code: {
195
- type: "string",
196
- description: "需要生成注释的代码(函数/类/模块),包含完整签名",
197
- },
198
- style: {
199
- type: "string",
200
- description: "注释风格:jsdoc, tsdoc, javadoc(默认 jsdoc)",
201
- },
202
- lang: {
203
- type: "string",
204
- description: "注释语言:zh, en(默认 zh)",
205
- },
206
- },
207
- required: [],
108
+ type: "string",
109
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function calculate() {...}'\n2) 自然语言:'生成代码注释'\n3) JSON字符串:'{\"code\":\"代码\", \"style\":\"jsdoc\", \"lang\":\"zh\"}'",
208
110
  },
209
111
  },
210
112
  {
211
113
  name: "genchangelog",
212
- description: "根据 commit 历史生成 CHANGELOG,按 feat/fix/breaking 分类;输出文本,不打 tag",
114
+ description: "🎯 支持自然语言输入!可直接说'生成 v1.2.0 的 changelog'。根据 commit 历史生成 CHANGELOG,按 feat/fix/breaking 分类;输出文本,不打 tag",
213
115
  inputSchema: {
214
- type: "object",
215
- properties: {
216
- version: {
217
- type: "string",
218
- description: "版本号(如 v1.2.0)",
219
- },
220
- from: {
221
- type: "string",
222
- description: "起始 commit hash 或 tag(如 v1.0.0 或 abc1234)",
223
- },
224
- to: {
225
- type: "string",
226
- description: "结束 commit hash 或 tag(默认 HEAD)",
227
- },
228
- },
229
- required: [],
116
+ type: "string",
117
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成 v1.2.0 的 changelog' 或 '生成变更日志'\n2) 版本号:'v1.2.0'\n3) JSON字符串:'{\"version\":\"v1.2.0\", \"from\":\"v1.0.0\"}'",
230
118
  },
231
119
  },
232
120
  {
233
121
  name: "refactor",
234
- description: "分析代码结构提供重构建议,输出重构步骤和风险评估;仅建议,不自动重构",
122
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'帮我重构这段代码'。分析代码结构提供重构建议,输出重构步骤和风险评估;仅建议,不自动重构",
235
123
  inputSchema: {
236
- type: "object",
237
- properties: {
238
- code: {
239
- type: "string",
240
- description: "需要重构的代码,包含完整上下文和依赖关系",
241
- },
242
- goal: {
243
- type: "string",
244
- description: "重构目标:improve_readability, reduce_complexity, extract_function, extract_class, remove_duplication, simplify_conditionals, improve_naming",
245
- },
246
- },
247
- required: [],
124
+ type: "string",
125
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function process() {...}'\n2) 带说明:'帮我重构这段代码:...'\n3) JSON字符串:'{\"code\":\"代码\", \"goal\":\"improve_readability\"}'",
248
126
  },
249
127
  },
250
128
  {
251
129
  name: "perf",
252
- description: "分析性能瓶颈(算法/内存/数据库/React渲染),输出结构化瓶颈清单(evidence/fix/impact);如需全面审查请用 start_review",
130
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'分析性能问题'。分析性能瓶颈(算法/内存/数据库/React渲染),输出结构化瓶颈清单(evidence/fix/impact);如需全面审查请用 start_review",
253
131
  inputSchema: {
254
- type: "object",
255
- properties: {
256
- code: {
257
- type: "string",
258
- description: "需要性能分析的代码,包含循环、数据库查询、渲染逻辑等关键路径",
259
- },
260
- type: {
261
- type: "string",
262
- description: "分析类型:algorithm, memory, react, database, all(默认 all)",
263
- },
264
- },
265
- required: [],
132
+ type: "string",
133
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'for(let i=0; i<n; i++) {...}'\n2) 带说明:'分析这段代码的性能问题:...'\n3) JSON字符串:'{\"code\":\"代码\", \"type\":\"algorithm\"}'",
266
134
  },
267
135
  },
268
136
  {
269
137
  name: "fix",
270
- description: "自动修复可机械化问题(Lint/TS/格式化/导入/未使用变量),输出补丁(unified diff);不做业务逻辑改动",
138
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'修复这段代码的问题'。自动修复可机械化问题(Lint/TS/格式化/导入/未使用变量),输出补丁(unified diff);不做业务逻辑改动",
271
139
  inputSchema: {
272
- type: "object",
273
- properties: {
274
- code: {
275
- type: "string",
276
- description: "需要修复的代码",
277
- },
278
- type: {
279
- type: "string",
280
- description: "修复类型:lint, type, format, import, unused, all(默认 all)",
281
- },
282
- },
283
- required: [],
140
+ type: "string",
141
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'const x = 1'\n2) 带说明:'修复这段代码的问题:...'\n3) JSON字符串:'{\"code\":\"代码\", \"type\":\"lint\"}'",
284
142
  },
285
143
  },
286
144
  {
287
145
  name: "gensql",
288
- description: "根据自然语言生成 SQL 语句(PostgreSQL/MySQL/SQLite);输出文本,不执行查询",
146
+ description: "🎯 完全支持自然语言输入!可直接说'查询所有活跃用户的姓名和邮箱'。根据自然语言生成 SQL 语句(PostgreSQL/MySQL/SQLite);输出文本,不执行查询",
289
147
  inputSchema: {
290
- type: "object",
291
- properties: {
292
- description: {
293
- type: "string",
294
- description: "查询需求的自然语言描述,包含表名、字段、条件、排序等要求",
295
- },
296
- dialect: {
297
- type: "string",
298
- description: "数据库类型:postgres, mysql, sqlite(默认 postgres)",
299
- },
300
- },
301
- required: [],
148
+ type: "string",
149
+ description: "💡 支持多种输入格式:\n1) 自然语言:'查询所有活跃用户的姓名和邮箱'\n2) 查询需求:'从 users 表查询 name 和 email,条件是 status=active'\n3) JSON字符串:'{\"description\":\"查询需求\", \"dialect\":\"postgres\"}'",
302
150
  },
303
151
  },
304
152
  {
305
153
  name: "resolve_conflict",
306
- description: "分析 Git 合并冲突,理解双方意图,输出补丁(unified diff);需人工确认后应用",
154
+ description: "🎯 支持自然语言输入!可直接粘贴冲突内容。分析 Git 合并冲突,理解双方意图,输出补丁(unified diff);需人工确认后应用",
307
155
  inputSchema: {
308
- type: "object",
309
- properties: {
310
- conflicts: {
311
- type: "string",
312
- description: "冲突文件内容(包含 <<<<<<< ======= >>>>>>> 标记)或 git diff 输出",
313
- },
314
- },
315
- required: [],
156
+ type: "string",
157
+ description: "💡 支持多种输入格式:\n1) 直接粘贴冲突内容:包含 <<<<<<< ======= >>>>>>> 标记的文件\n2) git diff 输出\n3) JSON字符串:'{\"conflicts\":\"冲突内容\"}'",
316
158
  },
317
159
  },
318
160
  {
319
161
  name: "genui",
320
- description: "生成 UI 组件代码(React/Vue/HTML),包含 Props 和样式;默认跟随项目现有前端栈与组件风格;输出代码",
162
+ description: "🎯 支持自然语言输入!可直接说'生成一个登录表单组件'。生成 UI 组件代码(React/Vue/HTML),包含 Props 和样式;默认跟随项目现有前端栈与组件风格;输出代码",
321
163
  inputSchema: {
322
- type: "object",
323
- properties: {
324
- description: {
325
- type: "string",
326
- description: "组件功能描述,包含交互行为、状态、样式要求",
327
- },
328
- framework: {
329
- type: "string",
330
- description: "框架:react, vue, html(默认跟随项目现有框架,若无法检测则 react)",
331
- },
332
- },
333
- required: [],
164
+ type: "string",
165
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成一个登录表单组件' 或 '创建用户卡片组件'\n2) 详细描述:包含交互行为、状态、样式要求\n3) JSON字符串:'{\"description\":\"组件描述\", \"framework\":\"react\"}'",
334
166
  },
335
167
  },
336
168
  {
337
169
  name: "explain",
338
- description: "解释代码逻辑和实现原理,包含执行流程、关键概念;输出文本,不修改代码",
170
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'解释这段代码'。解释代码逻辑和实现原理,包含执行流程、关键概念;输出文本,不修改代码",
339
171
  inputSchema: {
340
- type: "object",
341
- properties: {
342
- code: {
343
- type: "string",
344
- description: "需要解释的代码片段,包含必要的上下文(导入、类型定义)",
345
- },
346
- context: {
347
- type: "string",
348
- description: "补充说明(如业务背景、技术栈、想了解的重点)",
349
- },
350
- },
351
- required: [],
172
+ type: "string",
173
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function fibonacci(n) {...}'\n2) 带说明:'解释这段代码:...'\n3) JSON字符串:'{\"code\":\"代码\", \"context\":\"业务背景\"}'",
352
174
  },
353
175
  },
354
176
  {
355
177
  name: "convert",
356
- description: "转换代码格式或框架(JS→TS/Class→Hooks/Vue2→Vue3),保持逻辑不变;输出代码",
178
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'转换为TypeScript'。转换代码格式或框架(JS→TS/Class→Hooks/Vue2→Vue3),保持逻辑不变;输出代码",
357
179
  inputSchema: {
358
- type: "object",
359
- properties: {
360
- code: {
361
- type: "string",
362
- description: "源代码,包含完整的导入和类型定义",
363
- },
364
- from: {
365
- type: "string",
366
- description: "源格式/框架(如 js, ts, vue2, vue3, class, hooks, options-api, composition-api)",
367
- },
368
- to: {
369
- type: "string",
370
- description: "目标格式/框架(如 js, ts, vue2, vue3, class, hooks, options-api, composition-api)",
371
- },
372
- },
373
- required: [],
180
+ type: "string",
181
+ description: "💡 支持多种输入格式:\n1) 带说明:'转换为TypeScript:const x = 1'\n2) 直接粘贴代码(会自动识别转换方向)\n3) JSON字符串:'{\"code\":\"代码\", \"from\":\"js\", \"to\":\"ts\"}'",
374
182
  },
375
183
  },
376
184
  {
377
185
  name: "css_order",
378
- description: "重排 CSS 属性顺序,按布局→盒模型→视觉→其他规则整理;输出文本",
186
+ description: "🎯 支持自然语言输入!可直接粘贴CSS代码。重排 CSS 属性顺序,按布局→盒模型→视觉→其他规则整理;输出文本",
379
187
  inputSchema: {
380
- type: "object",
381
- properties: {},
382
- required: [],
188
+ type: "string",
189
+ description: "💡 支持多种输入格式:\n1) 直接粘贴CSS代码:'.button { color: red; ... }'\n2) 自然语言:'整理CSS属性顺序'\n3) 空字符串:处理当前文件的CSS",
383
190
  },
384
191
  },
385
192
  {
386
193
  name: "genreadme",
387
- description: "生成 README(介绍/安装/使用/脚本/FAQ);输出文本;如需 OpenAPI 请用 genapi 或 start_doc",
194
+ description: "🎯 支持自然语言输入!可直接说'生成README'或粘贴项目信息。生成 README(介绍/安装/使用/脚本/FAQ);输出文本;如需 OpenAPI 请用 genapi 或 start_doc",
388
195
  inputSchema: {
389
- type: "object",
390
- properties: {
391
- project_info: {
392
- type: "string",
393
- description: "项目信息或代码",
394
- },
395
- style: {
396
- type: "string",
397
- description: "风格:standard, minimal, detailed(默认 standard)",
398
- },
399
- },
400
- required: [],
196
+ type: "string",
197
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成README' 或 '生成项目文档'\n2) 粘贴项目信息或代码\n3) JSON字符串:'{\"project_info\":\"项目信息\", \"style\":\"detailed\"}'",
401
198
  },
402
199
  },
403
200
  {
404
201
  name: "split",
405
- description: "拆分大文件为小模块,按类型/功能/组件策略拆分;尽量保持对外导出与行为不变;输出代码",
202
+ description: "🎯 支持自然语言输入!可直接粘贴大文件内容并说'拆分这个文件'。拆分大文件为小模块,按类型/功能/组件策略拆分;尽量保持对外导出与行为不变;输出代码",
406
203
  inputSchema: {
407
- type: "object",
408
- properties: {
409
- file: {
410
- type: "string",
411
- description: "文件完整内容(推荐)或相对路径;内容需包含所有导入导出",
412
- },
413
- strategy: {
414
- type: "string",
415
- description: "拆分策略:auto, type, function, component, feature(默认 auto)",
416
- },
417
- },
418
- required: [],
204
+ type: "string",
205
+ description: "💡 支持多种输入格式:\n1) 直接粘贴文件内容:完整的代码文件\n2) 带说明:'拆分这个文件:...'\n3) JSON字符串:'{\"file\":\"文件内容\", \"strategy\":\"auto\"}'",
419
206
  },
420
207
  },
421
208
  {
422
209
  name: "analyze_project",
423
- description: "分析项目结构、技术栈、架构模式,输出项目全景报告;如需生成上下文文档请用 init_project_context",
210
+ description: "🎯 支持自然语言输入!可直接说'分析项目'。分析项目结构、技术栈、架构模式,输出项目全景报告;如需生成上下文文档请用 init_project_context",
424
211
  inputSchema: {
425
- type: "object",
426
- properties: {
427
- project_path: {
428
- type: "string",
429
- description: "项目路径(默认当前目录)",
430
- },
431
- max_depth: {
432
- type: "number",
433
- description: "目录树最大深度(默认 5)",
434
- },
435
- include_content: {
436
- type: "boolean",
437
- description: "是否包含文件内容(默认 true)",
438
- },
439
- },
440
- required: [],
212
+ type: "string",
213
+ description: "💡 支持多种输入格式:\n1) 自然语言:'分析项目' 或 '分析项目结构'\n2) 项目路径:'/path/to/project'\n3) JSON字符串:'{\"project_path\":\"路径\", \"max_depth\":5}'",
441
214
  },
442
215
  },
443
216
  {
444
217
  name: "init_project_context",
445
- description: "生成项目上下文文档(技术栈/架构/编码规范),供后续开发参考;如需分析项目请先用 analyze_project",
218
+ description: "🎯 支持自然语言输入!可直接说'生成项目上下文文档'。生成项目上下文文档(技术栈/架构/编码规范),供后续开发参考;如需分析项目请先用 analyze_project",
446
219
  inputSchema: {
447
- type: "object",
448
- properties: {
449
- docs_dir: {
450
- type: "string",
451
- description: "文档目录(默认 docs)",
452
- },
453
- },
454
- required: [],
220
+ type: "string",
221
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成项目上下文文档' 或 '生成开发文档'\n2) 文档目录:'docs'\n3) JSON字符串:'{\"docs_dir\":\"docs\"}'",
455
222
  },
456
223
  },
457
224
  {
458
225
  name: "add_feature",
459
- description: "生成新功能规格文档(需求/设计/任务清单),基于项目上下文;如需完整流程请用 start_feature",
226
+ description: "🎯 支持自然语言输入!可直接说'添加用户认证功能'。生成新功能规格文档(需求/设计/任务清单),基于项目上下文;如需完整流程请用 start_feature",
460
227
  inputSchema: {
461
- type: "object",
462
- properties: {
463
- feature_name: {
464
- type: "string",
465
- description: "功能名称(kebab-case 格式,如 user-auth)",
466
- },
467
- description: {
468
- type: "string",
469
- description: "功能描述",
470
- },
471
- docs_dir: {
472
- type: "string",
473
- description: "文档目录(默认 docs)",
474
- },
475
- },
476
- required: ["feature_name", "description"],
228
+ type: "string",
229
+ description: "💡 支持多种输入格式:\n1) 自然语言:'添加用户认证功能' 或 '实现支付功能'\n2) 功能描述:详细的功能需求说明\n3) JSON字符串:'{\"feature_name\":\"user-auth\", \"description\":\"功能描述\"}'",
477
230
  },
478
231
  },
479
232
  {
480
233
  name: "security_scan",
481
- description: "专项安全漏洞扫描(注入/认证/加密/敏感数据),输出结构化风险清单(severity/type/location/fix);如需全面审查请用 start_review",
234
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'扫描安全问题'。专项安全漏洞扫描(注入/认证/加密/敏感数据),输出结构化风险清单(severity/type/location/fix);如需全面审查请用 start_review",
482
235
  inputSchema: {
483
- type: "object",
484
- properties: {
485
- code: {
486
- type: "string",
487
- description: "需要扫描的代码,包含完整上下文(导入、配置、数据库操作等)",
488
- },
489
- language: {
490
- type: "string",
491
- description: "编程语言(默认自动检测)",
492
- },
493
- scan_type: {
494
- type: "string",
495
- description: "扫描类型:all, injection, auth, crypto, sensitive_data(默认 all)",
496
- },
497
- },
498
- required: ["code"],
236
+ type: "string",
237
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function login(username, password) {...}'\n2) 带说明:'扫描这段代码的安全问题:...'\n3) JSON字符串:'{\"code\":\"代码\", \"scan_type\":\"injection\"}'",
499
238
  },
500
239
  },
501
240
  {
502
241
  name: "fix_bug",
503
- description: "指导 Bug 修复流程,输出根因分析+修复方案+验证步骤;不保证自动修改代码,如要自动改可配合 fix",
242
+ description: "🎯 支持自然语言输入!可直接粘贴错误信息并说'帮我修复这个bug'。指导 Bug 修复流程,输出根因分析+修复方案+验证步骤;不保证自动修改代码,如要自动改可配合 fix",
504
243
  inputSchema: {
505
- type: "object",
506
- properties: {
507
- error_message: {
508
- type: "string",
509
- description: "完整错误消息,包含错误类型和描述",
510
- },
511
- stack_trace: {
512
- type: "string",
513
- description: "完整调用栈,包含文件路径和行号",
514
- },
515
- steps_to_reproduce: {
516
- type: "string",
517
- description: "复现步骤(操作序列或测试用例)",
518
- },
519
- expected_behavior: {
520
- type: "string",
521
- description: "期望行为(正确的输出或状态)",
522
- },
523
- actual_behavior: {
524
- type: "string",
525
- description: "实际行为(错误的输出或状态)",
526
- },
527
- },
528
- required: ["error_message"],
244
+ type: "string",
245
+ description: "💡 支持多种输入格式:\n1) 直接粘贴错误信息:'Error: Cannot find module...'\n2) 带说明:'帮我修复这个bug:...'\n3) JSON字符串:'{\"error_message\":\"错误\", \"stack_trace\":\"堆栈\"}'",
529
246
  },
530
247
  },
531
248
  {
532
249
  name: "estimate",
533
- description: "估算开发工作量,输出故事点、时间范围(乐观/正常/悲观)、风险点;仅估算,不生成代码",
250
+ description: "🎯 支持自然语言输入!可直接说'估算开发工作量'或描述任务。估算开发工作量,输出故事点、时间范围(乐观/正常/悲观)、风险点;仅估算,不生成代码",
534
251
  inputSchema: {
535
- type: "object",
536
- properties: {
537
- task_description: {
538
- type: "string",
539
- description: "任务描述(功能需求、技术要求、验收标准)",
540
- },
541
- code_context: {
542
- type: "string",
543
- description: "相关代码、现有实现或架构文档,用于评估复杂度",
544
- },
545
- team_size: {
546
- type: "number",
547
- description: "团队规模(默认 1)",
548
- },
549
- experience_level: {
550
- type: "string",
551
- description: "经验水平:junior, mid, senior(默认 mid)",
552
- },
553
- },
554
- required: ["task_description"],
252
+ type: "string",
253
+ description: "💡 支持多种输入格式:\n1) 自然语言:'估算开发工作量' 或 '评估这个任务需要多久'\n2) 任务描述:详细的功能需求和技术要求\n3) JSON字符串:'{\"task_description\":\"任务\", \"team_size\":3}'",
555
254
  },
556
255
  },
557
256
  {
558
257
  name: "gen_mock",
559
- description: "根据 TypeScript 类型或 JSON Schema 生成 Mock 数据;输出文本,不写入数据库",
258
+ description: "🎯 支持自然语言输入!可直接粘贴类型定义或说'生成用户数据'。根据 TypeScript 类型或 JSON Schema 生成 Mock 数据;输出文本,不写入数据库",
560
259
  inputSchema: {
561
- type: "object",
562
- properties: {
563
- schema: {
564
- type: "string",
565
- description: "数据结构定义(TypeScript interface 或 JSON Schema),字段名应有语义便于生成真实数据",
566
- },
567
- count: {
568
- type: "number",
569
- description: "生成数量(默认 1,最大 1000)",
570
- },
571
- format: {
572
- type: "string",
573
- description: "输出格式:json, typescript, javascript, csv(默认 json)",
574
- },
575
- locale: {
576
- type: "string",
577
- description: "语言区域:zh-CN, en-US(默认 zh-CN)",
578
- },
579
- seed: {
580
- type: "number",
581
- description: "随机种子(用于可重复生成,相同种子产生相同数据)",
582
- },
583
- },
584
- required: ["schema"],
260
+ type: "string",
261
+ description: "💡 支持多种输入格式:\n1) 直接粘贴类型定义:'interface User { name: string; ... }'\n2) 自然语言:'生成10条用户数据'\n3) JSON字符串:'{\"schema\":\"类型定义\", \"count\":10}'",
585
262
  },
586
263
  },
587
264
  {
588
265
  name: "design2code",
589
- description: "设计稿转代码(图片URL/描述/HTML→Vue/React),1:1 还原布局和样式;默认输出与项目一致的框架与样式方案;输出代码",
266
+ description: "🎯 支持自然语言输入!可直接粘贴设计稿URL或描述。设计稿转代码(图片URL/描述/HTML→Vue/React),1:1 还原布局和样式;默认输出与项目一致的框架与样式方案;输出代码",
590
267
  inputSchema: {
591
- type: "object",
592
- properties: {
593
- input: {
594
- type: "string",
595
- description: "设计稿图片 URL、base64 编码图片、设计稿文字描述或 HTML 源码(三选一)",
596
- },
597
- framework: {
598
- type: "string",
599
- description: "目标框架:vue, react(默认跟随项目现有框架,若无法检测则 vue)",
600
- },
601
- style_solution: {
602
- type: "string",
603
- description: "样式方案:tailwind, css-modules, styled-components(默认 tailwind)",
604
- },
605
- component_type: {
606
- type: "string",
607
- description: "组件类型:page(页面级), component(通用组件)(默认 page)",
608
- },
609
- },
610
- required: ["input"],
268
+ type: "string",
269
+ description: "💡 支持多种输入格式:\n1) 设计稿图片 URL:'https://example.com/design.png'\n2) 设计稿描述:'一个包含标题、输入框和按钮的登录页面'\n3) HTML 源码或 base64 图片\n4) JSON字符串:'{\"input\":\"URL或描述\", \"framework\":\"vue\"}'",
611
270
  },
612
271
  },
613
272
  // ========== 智能编排工具 ==========
614
273
  {
615
274
  name: "start_feature",
616
- description: "新功能开发编排:检查上下文→生成规格→估算工作量;若只需规格文档请用 add_feature",
275
+ description: "🎯 支持自然语言输入!可直接说'开发用户认证功能'。新功能开发编排:检查上下文→生成规格→估算工作量;若只需规格文档请用 add_feature",
617
276
  inputSchema: {
618
- type: "object",
619
- properties: {
620
- feature_name: {
621
- type: "string",
622
- description: "功能名称(kebab-case 格式)",
623
- },
624
- description: {
625
- type: "string",
626
- description: "功能描述",
627
- },
628
- docs_dir: {
629
- type: "string",
630
- description: "文档目录(默认 docs)",
631
- },
632
- },
633
- required: ["feature_name", "description"],
277
+ type: "string",
278
+ description: "💡 支持多种输入格式:\n1) 自然语言:'开发用户认证功能' 或 '实现支付模块'\n2) 功能描述:详细的功能需求\n3) JSON字符串:'{\"feature_name\":\"user-auth\", \"description\":\"功能描述\"}'",
634
279
  },
635
280
  },
636
281
  {
637
282
  name: "start_bugfix",
638
- description: "Bug 修复编排:检查上下文→分析定位→修复方案→生成测试;若只需定位与调试策略请用 debug;若只需修复流程指导请用 fix_bug",
283
+ description: "🎯 支持自然语言输入!可直接粘贴错误信息。Bug 修复编排:检查上下文→分析定位→修复方案→生成测试;若只需定位与调试策略请用 debug;若只需修复流程指导请用 fix_bug",
639
284
  inputSchema: {
640
- type: "object",
641
- properties: {
642
- error_message: {
643
- type: "string",
644
- description: "错误信息",
645
- },
646
- stack_trace: {
647
- type: "string",
648
- description: "堆栈跟踪",
649
- },
650
- },
651
- required: ["error_message"],
285
+ type: "string",
286
+ description: "💡 支持多种输入格式:\n1) 直接粘贴错误信息:'Error: Cannot find module...'\n2) 带说明:'修复这个bug:...'\n3) JSON字符串:'{\"error_message\":\"错误\", \"stack_trace\":\"堆栈\"}'",
652
287
  },
653
288
  },
654
289
  {
655
290
  name: "start_review",
656
- description: "代码全面体检:代码审查+安全扫描+性能分析,输出综合报告;若只需单项请用对应工具",
291
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'全面审查这段代码'。代码全面体检:代码审查+安全扫描+性能分析,输出综合报告;若只需单项请用对应工具",
657
292
  inputSchema: {
658
- type: "object",
659
- properties: {
660
- code: {
661
- type: "string",
662
- description: "需要审查的代码,建议提供完整文件或模块以便全面分析",
663
- },
664
- language: {
665
- type: "string",
666
- description: "编程语言(默认自动检测)",
667
- },
668
- },
669
- required: ["code"],
293
+ type: "string",
294
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function process() {...}'\n2) 带说明:'全面审查这段代码:...'\n3) JSON字符串:'{\"code\":\"代码\", \"language\":\"typescript\"}'",
670
295
  },
671
296
  },
672
297
  {
673
298
  name: "start_release",
674
- description: "发布准备编排:生成 Changelog→生成 PR 描述;若只需单项请用 genchangelog 或 genpr",
299
+ description: "🎯 支持自然语言输入!可直接说'准备发布 v1.2.0'。发布准备编排:生成 Changelog→生成 PR 描述;若只需单项请用 genchangelog 或 genpr",
675
300
  inputSchema: {
676
- type: "object",
677
- properties: {
678
- version: {
679
- type: "string",
680
- description: "版本号(如 v1.2.0)",
681
- },
682
- from_tag: {
683
- type: "string",
684
- description: "起始 tag(默认上个版本)",
685
- },
686
- branch: {
687
- type: "string",
688
- description: "分支名称",
689
- },
690
- },
691
- required: ["version"],
301
+ type: "string",
302
+ description: "💡 支持多种输入格式:\n1) 自然语言:'准备发布 v1.2.0' 或 '生成发布文档'\n2) 版本号:'v1.2.0'\n3) JSON字符串:'{\"version\":\"v1.2.0\", \"from_tag\":\"v1.0.0\"}'",
692
303
  },
693
304
  },
694
305
  {
695
306
  name: "start_refactor",
696
- description: "代码重构编排:审查现状→重构建议→生成测试;若只需建议请用 refactor",
307
+ description: "🎯 支持自然语言输入!可直接粘贴代码并说'重构这段代码'。代码重构编排:审查现状→重构建议→生成测试;若只需建议请用 refactor",
697
308
  inputSchema: {
698
- type: "object",
699
- properties: {
700
- code: {
701
- type: "string",
702
- description: "需要重构的代码",
703
- },
704
- goal: {
705
- type: "string",
706
- description: "重构目标:improve_readability, reduce_complexity, extract_function 等",
707
- },
708
- },
709
- required: ["code"],
309
+ type: "string",
310
+ description: "💡 支持多种输入格式:\n1) 直接粘贴代码:'function calculate() {...}'\n2) 带说明:'重构这段代码:...'\n3) JSON字符串:'{\"code\":\"代码\", \"goal\":\"reduce_complexity\"}'",
710
311
  },
711
312
  },
712
313
  {
713
314
  name: "start_onboard",
714
- description: "快速上手编排:分析项目→生成上下文文档;若只需分析请用 analyze_project",
315
+ description: "🎯 支持自然语言输入!可直接说'快速上手这个项目'。快速上手编排:分析项目→生成上下文文档;若只需分析请用 analyze_project",
715
316
  inputSchema: {
716
- type: "object",
717
- properties: {
718
- project_path: {
719
- type: "string",
720
- description: "项目路径(默认当前目录)",
721
- },
722
- docs_dir: {
723
- type: "string",
724
- description: "文档目录(默认 docs)",
725
- },
726
- },
727
- required: [],
317
+ type: "string",
318
+ description: "💡 支持多种输入格式:\n1) 自然语言:'快速上手这个项目' 或 '生成项目文档'\n2) 项目路径:'/path/to/project'\n3) JSON字符串:'{\"project_path\":\"路径\", \"docs_dir\":\"docs\"}'",
728
319
  },
729
320
  },
730
321
  {
731
322
  name: "start_api",
732
- description: "API 开发编排:生成文档→生成 Mock→生成测试;若只需单项请用对应生成工具",
323
+ description: "🎯 支持自然语言输入!可直接粘贴 API 代码。API 开发编排:生成文档→生成 Mock→生成测试;若只需单项请用对应生成工具",
733
324
  inputSchema: {
734
- type: "object",
735
- properties: {
736
- code: {
737
- type: "string",
738
- description: "API 代码(路由/Controller/Service),包含完整的请求响应定义",
739
- },
740
- language: {
741
- type: "string",
742
- description: "编程语言(默认自动检测)",
743
- },
744
- format: {
745
- type: "string",
746
- description: "文档格式:markdown, openapi(默认 markdown)",
747
- },
748
- },
749
- required: ["code"],
325
+ type: "string",
326
+ description: "💡 支持多种输入格式:\n1) 直接粘贴 API 代码:'app.get(\"/users\", ...) {...}'\n2) 自然语言:'生成 API 文档和测试'\n3) JSON字符串:'{\"code\":\"API代码\", \"format\":\"openapi\"}'",
750
327
  },
751
328
  },
752
329
  {
753
330
  name: "start_doc",
754
- description: "文档补全编排:注释→README→API 文档;若只需单项文档请用对应生成工具",
331
+ description: "🎯 支持自然语言输入!可直接粘贴代码或说'补全文档'。文档补全编排:注释→README→API 文档;若只需单项文档请用对应生成工具",
755
332
  inputSchema: {
756
- type: "object",
757
- properties: {
758
- code: {
759
- type: "string",
760
- description: "代码或项目信息",
761
- },
762
- style: {
763
- type: "string",
764
- description: "注释风格:jsdoc, tsdoc(默认 jsdoc)",
765
- },
766
- lang: {
767
- type: "string",
768
- description: "语言:zh, en(默认 zh)",
769
- },
770
- },
771
- required: ["code"],
333
+ type: "string",
334
+ description: "💡 支持多种输入格式:\n1) 自然语言:'补全文档' 或 '生成完整文档'\n2) 直接粘贴代码\n3) JSON字符串:'{\"code\":\"代码\", \"style\":\"jsdoc\"}'",
772
335
  },
773
336
  },
774
337
  {
775
338
  name: "gen_skill",
776
- description: "生成 Agent Skills 文档,为 MCP Probe Kit 工具生成符合开放标准的技能文档;输出到 skills/ 目录,用户可自行修改扩展",
339
+ description: "🎯 支持自然语言输入!可直接说'生成技能文档'。生成 Agent Skills 文档,为 MCP Probe Kit 工具生成符合开放标准的技能文档;输出到 skills/ 目录,用户可自行修改扩展",
777
340
  inputSchema: {
778
- type: "object",
779
- properties: {
780
- scope: {
781
- type: "string",
782
- description: "生成范围:all(全部), basic, generation, analysis, refactoring, workflow, context, orchestration(默认 all)",
783
- },
784
- tool_name: {
785
- type: "string",
786
- description: "指定单个工具名称(如 code_review),优先级高于 scope",
787
- },
788
- output_dir: {
789
- type: "string",
790
- description: "输出目录(默认 skills)",
791
- },
792
- lang: {
793
- type: "string",
794
- description: "文档语言:zh, en(默认 zh)",
795
- },
796
- },
797
- required: [],
341
+ type: "string",
342
+ description: "💡 支持多种输入格式:\n1) 自然语言:'生成技能文档' 或 '生成所有工具的文档'\n2) 工具名称:'code_review'\n3) JSON字符串:'{\"scope\":\"all\", \"lang\":\"zh\"}'",
798
343
  },
799
344
  },
800
345
  ],