@leeguoo/zentao-mcp 0.3.3 → 0.4.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 (3) hide show
  1. package/README.md +2 -14
  2. package/package.json +1 -1
  3. package/src/index.js +1 -44
package/README.md CHANGED
@@ -92,11 +92,10 @@ If you prefer to use environment variables instead of CLI args, you can configur
92
92
 
93
93
  ## Tools
94
94
 
95
- The MCP server provides four tools that can be triggered by natural language in Cursor:
95
+ The MCP server provides three tools that can be triggered by natural language in Cursor:
96
96
 
97
97
  - **`zentao_products_list`** - List all products
98
98
  - **`zentao_bugs_list`** - List bugs for a specific product
99
- - **`zentao_bugs_stats`** - Get bug statistics across products
100
99
  - **`zentao_bugs_mine`** - List my bugs by assignment or creator (status filter supported)
101
100
 
102
101
  ### Usage Examples
@@ -107,7 +106,6 @@ After configuring the MCP server in Cursor, you can use natural language to inte
107
106
  - "Show me all products"
108
107
  - "List bugs for product 1"
109
108
  - "Show me bugs"
110
- - "What's the bug statistics?"
111
109
  - "Show my bugs"
112
110
  - "List bugs assigned to me"
113
111
  - "View bugs in product 2"
@@ -115,7 +113,6 @@ After configuring the MCP server in Cursor, you can use natural language to inte
115
113
  **Chinese (中文):**
116
114
  - "看bug" / "查看bug" / "显示bug"
117
115
  - "产品1的bug列表"
118
- - "bug统计"
119
116
  - "显示所有产品"
120
117
  - "查看产品2的问题"
121
118
  - "我的bug"
@@ -124,8 +121,7 @@ After configuring the MCP server in Cursor, you can use natural language to inte
124
121
  The AI will automatically:
125
122
  1. Use `zentao_products_list` to get product IDs when needed
126
123
  2. Use `zentao_bugs_list` when you ask to see bugs
127
- 3. Use `zentao_bugs_stats` when you ask for statistics or overview
128
- 4. Use `zentao_bugs_mine` when you ask for your own bugs
124
+ 3. Use `zentao_bugs_mine` when you ask for your own bugs
129
125
 
130
126
  ### Tool Parameters
131
127
 
@@ -146,14 +142,6 @@ The AI will automatically:
146
142
  }
147
143
  ```
148
144
 
149
- **zentao_bugs_stats:**
150
- ```json
151
- {
152
- "includeZero": false,
153
- "limit": 1000
154
- }
155
- ```
156
-
157
145
  **zentao_bugs_mine:**
158
146
  ```json
159
147
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeguoo/zentao-mcp",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for ZenTao RESTful APIs",
5
5
  "keywords": [
6
6
  "zentao",
package/src/index.js CHANGED
@@ -227,34 +227,6 @@ class ZentaoClient {
227
227
  return { bugs, total };
228
228
  }
229
229
 
230
- async bugStats({ includeZero, limit }) {
231
- const productsResponse = await this.listProducts({ page: 1, limit: toInt(limit, 1000) });
232
- if (productsResponse.status !== 1) return productsResponse;
233
-
234
- const products = productsResponse.result.products || [];
235
- const rows = [];
236
- let total = 0;
237
-
238
- products.forEach((product) => {
239
- const totalBugs = toInt(product.totalBugs, 0);
240
- if (!includeZero && totalBugs === 0) return;
241
- total += totalBugs;
242
- rows.push({
243
- id: product.id,
244
- name: product.name,
245
- totalBugs,
246
- unresolvedBugs: toInt(product.unresolvedBugs, 0),
247
- closedBugs: toInt(product.closedBugs, 0),
248
- fixedBugs: toInt(product.fixedBugs, 0),
249
- });
250
- });
251
-
252
- return normalizeResult({
253
- total,
254
- products: rows,
255
- });
256
- }
257
-
258
230
  async bugsMine({
259
231
  account,
260
232
  scope,
@@ -371,7 +343,7 @@ function getClient() {
371
343
  const server = new Server(
372
344
  {
373
345
  name: "zentao-mcp",
374
- version: "0.3.3",
346
+ version: "0.4.0",
375
347
  },
376
348
  {
377
349
  capabilities: {
@@ -407,18 +379,6 @@ const tools = [
407
379
  additionalProperties: false,
408
380
  },
409
381
  },
410
- {
411
- name: "zentao_bugs_stats",
412
- description: "Get bug statistics (bug统计) across all products. Shows total bugs, unresolved bugs, closed bugs, and fixed bugs per product. Use when user asks for bug summary, statistics, overview, or 'bug统计'.",
413
- inputSchema: {
414
- type: "object",
415
- properties: {
416
- includeZero: { type: "boolean", description: "Include products with zero bugs (default false)." },
417
- limit: { type: "integer", description: "Max products to fetch (default 1000)." },
418
- },
419
- additionalProperties: false,
420
- },
421
- },
422
382
  {
423
383
  name: "zentao_bugs_mine",
424
384
  description: "List my bugs (我的Bug) by assignment or creator. Default scope is assigned. Use when user asks for 'my bugs', '我的bug', '分配给我', or personal bug list.",
@@ -463,9 +423,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
463
423
  case "zentao_bugs_list":
464
424
  result = await api.listBugs(args);
465
425
  break;
466
- case "zentao_bugs_stats":
467
- result = await api.bugStats(args);
468
- break;
469
426
  case "zentao_bugs_mine":
470
427
  result = await api.bugsMine(args);
471
428
  break;