zephyr-scale-mcp-server 0.3.1 → 0.3.2

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.
package/build/index.js CHANGED
@@ -55,6 +55,8 @@ class ZephyrServer {
55
55
  return await this.toolHandlers.getTestRunCases(args);
56
56
  case 'delete_test_case':
57
57
  return await this.toolHandlers.deleteTestCase(args);
58
+ case 'delete_test_run':
59
+ return await this.toolHandlers.deleteTestRun(args);
58
60
  case 'create_test_run':
59
61
  return await this.toolHandlers.createTestRun(args);
60
62
  case 'get_test_run':
@@ -273,6 +273,26 @@ export class ZephyrToolHandlers {
273
273
  throw new McpError(ErrorCode.InternalError, `Failed to delete test case: ${error instanceof Error ? error.message : String(error)}`);
274
274
  }
275
275
  }
276
+ async deleteTestRun(args) {
277
+ const { test_run_key } = args;
278
+ try {
279
+ const response = await this.axiosInstance.delete(`${this.jiraConfig.apiEndpoints.testrun}/${test_run_key}`);
280
+ if (response.status === 204) {
281
+ return {
282
+ content: [{ type: 'text', text: `Test run ${test_run_key} deleted successfully.` }],
283
+ };
284
+ }
285
+ else {
286
+ return {
287
+ content: [{ type: 'text', text: `Failed to delete test run. Status: ${response.status}` }],
288
+ isError: true,
289
+ };
290
+ }
291
+ }
292
+ catch (error) {
293
+ throw new McpError(ErrorCode.InternalError, `Failed to delete test run: ${error instanceof Error ? error.message : String(error)}`);
294
+ }
295
+ }
276
296
  async createTestRun(args) {
277
297
  const { project_key, name, test_case_keys, test_plan_key, folder, planned_start_date, planned_end_date, description, owner, environment, issue_key, issue_links, custom_fields } = args;
278
298
  // Build the basic payload
@@ -373,6 +373,20 @@ export const toolSchemas = [
373
373
  },
374
374
  },
375
375
  },
376
+ {
377
+ name: 'delete_test_run',
378
+ description: 'Delete a specific test run',
379
+ inputSchema: {
380
+ type: 'object',
381
+ properties: {
382
+ test_run_key: {
383
+ type: 'string',
384
+ description: 'Test run key to delete (e.g., PROJ-R123)',
385
+ },
386
+ },
387
+ required: ['test_run_key'],
388
+ },
389
+ },
376
390
  {
377
391
  name: 'add_test_cases_to_run',
378
392
  description: 'Add test cases to an existing test run (Cloud only — not supported on Data Center)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-scale-mcp-server",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Model Context Protocol (MCP) server for Zephyr Scale test case management with comprehensive STEP_BY_STEP, PLAIN_TEXT, and BDD support",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
package/src/index.ts CHANGED
@@ -75,6 +75,8 @@ class ZephyrServer {
75
75
  return await this.toolHandlers.getTestRunCases(args);
76
76
  case 'delete_test_case':
77
77
  return await this.toolHandlers.deleteTestCase(args);
78
+ case 'delete_test_run':
79
+ return await this.toolHandlers.deleteTestRun(args);
78
80
  case 'create_test_run':
79
81
  return await this.toolHandlers.createTestRun(args as any);
80
82
  case 'get_test_run':
@@ -301,6 +301,25 @@ export class ZephyrToolHandlers {
301
301
  }
302
302
  }
303
303
 
304
+ async deleteTestRun(args: any) {
305
+ const { test_run_key } = args;
306
+ try {
307
+ const response = await this.axiosInstance.delete(`${this.jiraConfig.apiEndpoints.testrun}/${test_run_key}`);
308
+ if (response.status === 204) {
309
+ return {
310
+ content: [{ type: 'text', text: `Test run ${test_run_key} deleted successfully.` }],
311
+ };
312
+ } else {
313
+ return {
314
+ content: [{ type: 'text', text: `Failed to delete test run. Status: ${response.status}` }],
315
+ isError: true,
316
+ };
317
+ }
318
+ } catch (error) {
319
+ throw new McpError(ErrorCode.InternalError, `Failed to delete test run: ${error instanceof Error ? error.message : String(error)}`);
320
+ }
321
+ }
322
+
304
323
  async createTestRun(args: TestRunArgs) {
305
324
  const {
306
325
  project_key,
@@ -373,6 +373,20 @@ export const toolSchemas = [
373
373
  },
374
374
  },
375
375
  },
376
+ {
377
+ name: 'delete_test_run',
378
+ description: 'Delete a specific test run',
379
+ inputSchema: {
380
+ type: 'object',
381
+ properties: {
382
+ test_run_key: {
383
+ type: 'string',
384
+ description: 'Test run key to delete (e.g., PROJ-R123)',
385
+ },
386
+ },
387
+ required: ['test_run_key'],
388
+ },
389
+ },
376
390
  {
377
391
  name: 'add_test_cases_to_run',
378
392
  description: 'Add test cases to an existing test run (Cloud only — not supported on Data Center)',