@smartbear/mcp 0.10.0 → 0.12.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 (63) hide show
  1. package/README.md +10 -8
  2. package/dist/bugsnag/client/api/Error.js +1 -1
  3. package/dist/bugsnag/client/api/Project.js +152 -0
  4. package/dist/bugsnag/client/api/api.js +130 -3
  5. package/dist/bugsnag/client/api/base.js +19 -0
  6. package/dist/bugsnag/client/api/index.js +2 -0
  7. package/dist/bugsnag/client/filters.js +0 -6
  8. package/dist/bugsnag/client.js +739 -378
  9. package/dist/bugsnag/input-schemas.js +59 -0
  10. package/dist/collaborator/client.js +18 -5
  11. package/dist/common/cache.js +63 -0
  12. package/dist/common/client-registry.js +128 -0
  13. package/dist/common/register-clients.js +31 -0
  14. package/dist/common/server.js +30 -9
  15. package/dist/common/transport-http.js +377 -0
  16. package/dist/common/transport-stdio.js +48 -0
  17. package/dist/index.js +20 -70
  18. package/dist/pactflow/client.js +39 -19
  19. package/dist/qmetry/client/auto-resolve.js +10 -0
  20. package/dist/qmetry/client/automation.js +171 -0
  21. package/dist/qmetry/client/handlers.js +9 -2
  22. package/dist/qmetry/client/project.js +87 -1
  23. package/dist/qmetry/client/testsuite.js +37 -1
  24. package/dist/qmetry/client/tools/automation-tools.js +290 -0
  25. package/dist/qmetry/client/tools/index.js +3 -0
  26. package/dist/qmetry/client/tools/issue-tools.js +1 -1
  27. package/dist/qmetry/client/tools/project-tools.js +311 -1
  28. package/dist/qmetry/client/tools/requirement-tools.js +1 -1
  29. package/dist/qmetry/client/tools/testcase-tools.js +311 -39
  30. package/dist/qmetry/client/tools/testsuite-tools.js +337 -23
  31. package/dist/qmetry/client.js +24 -9
  32. package/dist/qmetry/config/constants.js +6 -0
  33. package/dist/qmetry/config/rest-endpoints.js +8 -0
  34. package/dist/qmetry/types/automation.js +8 -0
  35. package/dist/qmetry/types/common.js +299 -4
  36. package/dist/qmetry/types/issues.js +5 -0
  37. package/dist/qmetry/types/project.js +13 -0
  38. package/dist/qmetry/types/requirements.js +5 -0
  39. package/dist/qmetry/types/testcase.js +5 -0
  40. package/dist/qmetry/types/testsuite.js +9 -0
  41. package/dist/reflect/client.js +10 -4
  42. package/dist/{api-hub → swagger}/client/api.js +94 -37
  43. package/dist/{api-hub → swagger}/client/configuration.js +4 -2
  44. package/dist/{api-hub → swagger}/client/index.js +2 -2
  45. package/dist/{api-hub → swagger}/client/portal-types.js +7 -6
  46. package/dist/{api-hub → swagger}/client/registry-types.js +26 -0
  47. package/dist/{api-hub → swagger}/client/tools.js +19 -20
  48. package/dist/{api-hub → swagger}/client.js +51 -39
  49. package/dist/swagger/config-utils.js +18 -0
  50. package/dist/tests/unit/bugsnag/utils/factories.js +86 -0
  51. package/dist/zephyr/client.js +44 -8
  52. package/dist/zephyr/common/rest-api-schemas.js +79 -78
  53. package/dist/zephyr/tool/environment/get-environments.js +68 -0
  54. package/dist/zephyr/tool/priority/get-priorities.js +43 -0
  55. package/dist/zephyr/tool/status/get-statuses.js +49 -0
  56. package/dist/zephyr/tool/test-case/get-test-case.js +39 -0
  57. package/dist/zephyr/tool/test-case/get-test-cases.js +64 -0
  58. package/dist/zephyr/tool/test-cycle/get-test-cycle.js +39 -0
  59. package/dist/zephyr/tool/test-cycle/get-test-cycles.js +2 -2
  60. package/dist/zephyr/tool/test-execution/get-test-execution.js +39 -0
  61. package/dist/zephyr/tool/test-execution/get-test-executions.js +45 -0
  62. package/package.json +4 -3
  63. /package/dist/{api-hub → swagger}/client/user-management-types.js +0 -0
@@ -197,7 +197,7 @@ export const ISSUE_TOOLS = [
197
197
  },
198
198
  {
199
199
  description: "Get issues with manual viewId (skip auto-resolution)",
200
- parameters: { projectKey: "MAC", viewId: 166065 },
200
+ parameters: { projectKey: "MAC", viewId: 166065 }, // This is an example viewId, must be resolved per project IS viewId
201
201
  expectedOutput: "Issues using manually specified viewId 166065",
202
202
  },
203
203
  {
@@ -1,5 +1,5 @@
1
1
  import { QMetryToolsHandlers } from "../../config/constants.js";
2
- import { BuildArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ProjectListArgsSchema, ReleasesCyclesArgsSchema, } from "../../types/common.js";
2
+ import { BuildArgsSchema, CreateCycleArgsSchema, CreateReleaseArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ProjectListArgsSchema, ReleasesCyclesArgsSchema, UpdateCycleArgsSchema, } from "../../types/common.js";
3
3
  export const PROJECT_TOOLS = [
4
4
  {
5
5
  title: "Fetch QMetry list Projects",
@@ -345,4 +345,314 @@ export const PROJECT_TOOLS = [
345
345
  idempotent: true,
346
346
  openWorld: false,
347
347
  },
348
+ {
349
+ title: "Create Release",
350
+ summary: "Create a new release in QMetry with optional cycle for test planning and execution tracking",
351
+ handler: QMetryToolsHandlers.CREATE_RELEASE,
352
+ inputSchema: CreateReleaseArgsSchema,
353
+ purpose: "Create a new release in QMetry to organize test execution phases. " +
354
+ "Releases represent major versions or milestones in your project. " +
355
+ "Optionally create a cycle within the release for more granular test execution planning. " +
356
+ "This tool helps establish the test planning hierarchy and enables better test execution tracking.",
357
+ useCases: [
358
+ "Create a new release for a major product version (e.g., v2.0, Q1 Release)",
359
+ "Create a release with an initial cycle for immediate test planning",
360
+ "Set up release dates for sprint planning and milestone tracking",
361
+ "Organize test execution by product versions and cycles",
362
+ "Create release hierarchy for better test planning and reporting",
363
+ "Establish test execution phases with releases and cycles",
364
+ ],
365
+ examples: [
366
+ {
367
+ description: "Create a basic release with just a name",
368
+ parameters: {
369
+ release: {
370
+ name: "Release 2.0",
371
+ },
372
+ },
373
+ expectedOutput: "Release 'Release 2.0' created successfully with generated release ID",
374
+ },
375
+ {
376
+ description: "Create a release with description and dates",
377
+ parameters: {
378
+ release: {
379
+ name: "Q1 2024 Release",
380
+ description: "First quarter release for 2024",
381
+ startDate: "01-01-2024",
382
+ targetDate: "31-03-2024",
383
+ },
384
+ },
385
+ expectedOutput: "Release 'Q1 2024 Release' created with start date 01-01-2024 and target date 31-03-2024",
386
+ },
387
+ {
388
+ description: "Create a release with an initial cycle",
389
+ parameters: {
390
+ release: {
391
+ name: "Release 3.0",
392
+ description: "Major product update",
393
+ },
394
+ cycle: {
395
+ name: "Sprint 1",
396
+ isLocked: false,
397
+ isArchived: false,
398
+ },
399
+ },
400
+ expectedOutput: "Release 'Release 3.0' created with cycle 'Sprint 1' for test execution planning",
401
+ },
402
+ {
403
+ description: "Create a release with all details",
404
+ parameters: {
405
+ release: {
406
+ name: "Summer 2024 Release",
407
+ description: "Summer product release with new features",
408
+ startDate: "01-06-2024",
409
+ targetDate: "31-08-2024",
410
+ },
411
+ cycle: {
412
+ name: "Beta Testing Cycle",
413
+ isLocked: false,
414
+ },
415
+ },
416
+ expectedOutput: "Release 'Summer 2024 Release' created with dates and 'Beta Testing Cycle' for test execution",
417
+ },
418
+ ],
419
+ hints: [
420
+ "CRITICAL: release.name is REQUIRED - must provide a name for the release",
421
+ "Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
422
+ "Check your QMetry instance settings to determine the correct date format",
423
+ "If dates are in wrong format, QMetry will return an error - verify format with admin",
424
+ "projectID is optional in the release object - it will be auto-resolved from the project key if not provided",
425
+ "To explicitly set projectID, first call FETCH_PROJECT_INFO to get the numeric project ID",
426
+ "cycle parameter is completely optional - omit it if you only want to create a release",
427
+ "If providing cycle, cycle.name is REQUIRED",
428
+ "cycle.isLocked defaults to false if not provided - set to true to prevent modifications",
429
+ "cycle.isArchived defaults to false if not provided - set to true to archive immediately (rare)",
430
+ "Releases can have multiple cycles added later using other tools",
431
+ "Use descriptive release names like 'Release 2.0', 'Q1 2024', 'Sprint 15' for better organization",
432
+ "startDate and targetDate help with sprint planning and milestone tracking",
433
+ "Creating a release with a cycle is useful for immediate test planning after release creation",
434
+ "Release hierarchy: Project → Release → Cycle → Test Execution",
435
+ "After creating a release, you can associate test suites and test cases with it",
436
+ "Use FETCH_RELEASES_CYCLES tool after creation to verify the release was created successfully",
437
+ ],
438
+ outputDescription: "JSON object containing the created release ID, release details, and cycle information if provided",
439
+ readOnly: false,
440
+ idempotent: false,
441
+ },
442
+ {
443
+ title: "Create Cycle",
444
+ summary: "Create a new cycle within an existing release in QMetry for test execution planning",
445
+ handler: QMetryToolsHandlers.CREATE_CYCLE,
446
+ inputSchema: CreateCycleArgsSchema,
447
+ purpose: "Create a new cycle within an existing release to organize test execution phases. " +
448
+ "Cycles represent specific testing iterations, sprints, or phases within a release. " +
449
+ "This tool requires an existing release and creates a cycle associated with it. " +
450
+ "Essential for granular test planning and sprint-based test execution tracking.",
451
+ useCases: [
452
+ "Create a new test cycle for a sprint within an existing release",
453
+ "Add additional testing phases to an existing release",
454
+ "Set up regression testing cycles for a specific release",
455
+ "Organize test execution by sprints, phases, or iterations",
456
+ "Create cycles with specific date ranges for milestone tracking",
457
+ "Establish test execution phases within release planning",
458
+ ],
459
+ examples: [
460
+ {
461
+ description: "Create a basic cycle with just a name in a release",
462
+ parameters: {
463
+ cycle: {
464
+ name: "Sprint 2",
465
+ releaseID: 12345,
466
+ },
467
+ },
468
+ expectedOutput: "Cycle 'Sprint 2' created successfully in release ID 12345",
469
+ },
470
+ {
471
+ description: "Create a cycle with description and dates",
472
+ parameters: {
473
+ cycle: {
474
+ name: "Regression Testing Cycle",
475
+ description: "Full regression testing for release 2.0",
476
+ startDate: "15-01-2024",
477
+ targetDate: "31-01-2024",
478
+ releaseID: 12345,
479
+ },
480
+ },
481
+ expectedOutput: "Cycle 'Regression Testing Cycle' created with start date 15-01-2024 and target date 31-01-2024 in release 12345",
482
+ },
483
+ {
484
+ description: "Create a locked cycle to prevent modifications",
485
+ parameters: {
486
+ cycle: {
487
+ name: "Final QA Cycle",
488
+ description: "Locked cycle for final QA testing",
489
+ isLocked: true,
490
+ isArchived: false,
491
+ releaseID: 12345,
492
+ },
493
+ },
494
+ expectedOutput: "Locked cycle 'Final QA Cycle' created in release 12345 to prevent modifications",
495
+ },
496
+ {
497
+ description: "Create a cycle with all details including project ID and dates",
498
+ parameters: {
499
+ cycle: {
500
+ name: "Sprint 3 - Feature Testing",
501
+ description: "Testing new features for Sprint 3",
502
+ startDate: "01-02-2024",
503
+ targetDate: "15-02-2024",
504
+ isLocked: false,
505
+ isArchived: false,
506
+ projectID: 67890,
507
+ releaseID: 12345,
508
+ },
509
+ },
510
+ expectedOutput: "Cycle 'Sprint 3 - Feature Testing' created with dates and project context in release 12345",
511
+ },
512
+ ],
513
+ hints: [
514
+ "CRITICAL: cycle.releaseID is REQUIRED - must provide the release ID to associate this cycle with",
515
+ "CRITICAL: cycle.name is REQUIRED - must provide a name for the cycle",
516
+ "HOW TO GET releaseID:",
517
+ "1. Call FETCH_RELEASES_CYCLES tool to get all releases and their IDs",
518
+ "2. From the response, get value from projects.releases[<index>].releaseID",
519
+ "3. Use that numeric releaseID in the cycle.releaseID parameter",
520
+ "Example: Release 'Q1 2024' might have releaseID: 12345",
521
+ "CRITICAL WORKFLOW - IF USER PROVIDES RELEASE NAME:",
522
+ "1. User says: 'Create cycle Sprint 2 in release Q1 2024'",
523
+ "2. You MUST first call FETCH_RELEASES_CYCLES tool to get all releases",
524
+ "3. Search the response for release with name 'Q1 2024'",
525
+ "4. Extract projects.releases[<index>].releaseID from matching release",
526
+ "5. Use that releaseID in cycle.releaseID parameter",
527
+ "6. If release name not found, inform user and list available releases",
528
+ "Example workflow:",
529
+ "- User request: 'Create cycle Sprint 2 in Release 2.0'",
530
+ "- Step 1: Call FETCH_RELEASES_CYCLES",
531
+ "- Step 2: Find release where name = 'Release 2.0', get its releaseID (e.g., 12345)",
532
+ "- Step 3: Call CREATE_CYCLE with cycle.releaseID = 12345",
533
+ "RELEASE NAME RESOLUTION:",
534
+ "- NEVER assume or guess release IDs - always fetch from API",
535
+ "- Release names are user-defined strings (e.g., 'Q1 2024', 'Release 2.0', 'Sprint 15')",
536
+ "- Release IDs are numeric identifiers assigned by QMetry (e.g., 12345, 67890)",
537
+ "- Match release names case-insensitively when searching",
538
+ "- If multiple releases match the name, ask user to clarify or use the most recent one",
539
+ "- FETCH_RELEASES_CYCLES returns: projects.releases[] array with name and releaseID fields",
540
+ "Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
541
+ "Check your QMetry instance settings to determine the correct date format",
542
+ "If dates are in wrong format, QMetry will return an error - verify format with admin",
543
+ "projectID is optional in the cycle object - it will be auto-resolved from the project key if not provided",
544
+ "To explicitly set projectID, first call FETCH_PROJECT_INFO to get the numeric project ID",
545
+ "cycle.isLocked defaults to false if not provided - set to true to prevent modifications",
546
+ "cycle.isArchived defaults to false if not provided - set to true to archive immediately (rare)",
547
+ "Use descriptive cycle names like 'Sprint 2', 'Regression Cycle', 'Alpha Testing' for better organization",
548
+ "startDate and targetDate help with sprint planning and milestone tracking",
549
+ "Cycle hierarchy: Project → Release → Cycle → Test Execution",
550
+ "After creating a cycle, you can associate test suites and test cases with it",
551
+ "Use FETCH_RELEASES_CYCLES tool after creation to verify the cycle was created successfully",
552
+ "DIFFERENCE FROM CREATE_RELEASE: This tool creates a cycle in an EXISTING release, while CREATE_RELEASE can create a release with an optional cycle",
553
+ "If you need to create both a release and a cycle together, use CREATE_RELEASE tool instead",
554
+ "If release doesn't exist yet, create it first with CREATE_RELEASE, then add more cycles with this tool",
555
+ ],
556
+ outputDescription: "JSON object containing the created cycle ID, cycle details, and association with the release",
557
+ readOnly: false,
558
+ idempotent: false,
559
+ },
560
+ {
561
+ title: "Update Cycle",
562
+ summary: "Update an existing cycle in QMetry for test execution planning",
563
+ handler: QMetryToolsHandlers.UPDATE_CYCLE,
564
+ inputSchema: UpdateCycleArgsSchema,
565
+ purpose: "Update an existing cycle within a release to modify test execution phase details. " +
566
+ "Cycles represent specific testing iterations, sprints, or phases within a release. " +
567
+ "This tool requires buildID and releaseID to identify the cycle to update. " +
568
+ "Essential for maintaining accurate test planning and sprint-based test execution tracking.",
569
+ useCases: [
570
+ "Update cycle name for better organization",
571
+ "Modify cycle dates to reflect schedule changes",
572
+ "Adjust testing phase timelines within a release",
573
+ "Update cycle metadata for sprint tracking",
574
+ "Revise milestone dates for test execution planning",
575
+ "Rename cycles to match updated sprint naming conventions",
576
+ ],
577
+ examples: [
578
+ {
579
+ description: "Update cycle name",
580
+ parameters: {
581
+ cycle: {
582
+ name: "Alpha_v1_Updated",
583
+ buildID: 1494,
584
+ releaseID: 3729,
585
+ },
586
+ },
587
+ expectedOutput: "Cycle updated successfully with new name 'Alpha_v1_Updated'",
588
+ },
589
+ {
590
+ description: "Update cycle dates",
591
+ parameters: {
592
+ cycle: {
593
+ startDate: "10-10-2018",
594
+ targetDate: "11-11-2018",
595
+ buildID: 1494,
596
+ releaseID: 3729,
597
+ },
598
+ },
599
+ expectedOutput: "Cycle dates updated successfully with new start date 10-10-2018 and target date 11-11-2018",
600
+ },
601
+ {
602
+ description: "Update cycle name and dates together",
603
+ parameters: {
604
+ cycle: {
605
+ name: "Sprint 2 - Updated",
606
+ startDate: "15-01-2024",
607
+ targetDate: "31-01-2024",
608
+ buildID: 1494,
609
+ releaseID: 3729,
610
+ },
611
+ },
612
+ expectedOutput: "Cycle updated with new name and dates successfully",
613
+ },
614
+ ],
615
+ hints: [
616
+ "CRITICAL: cycle.buildID is REQUIRED - must provide the build ID to identify the cycle to update",
617
+ "CRITICAL: cycle.releaseID is REQUIRED - must provide the release ID to identify the cycle to update",
618
+ "HOW TO GET buildID and releaseID:",
619
+ "1. Call FETCH_RELEASES_CYCLES tool (API: 'Cycle/List') to get all cycles",
620
+ "2. From the response, get buildID from projects.releases[<index>].builds[<index>].buildID",
621
+ "3. From the response, get releaseID from projects.releases[<index>].releaseID",
622
+ "4. Use those numeric IDs in cycle.buildID and cycle.releaseID parameters",
623
+ "Example: Cycle 'Sprint 2' might have buildID: 1494 and releaseID: 3729",
624
+ "CRITICAL WORKFLOW - IF USER PROVIDES CYCLE NAME:",
625
+ "1. User says: 'Update cycle Sprint 2 to change dates'",
626
+ "2. You MUST first call FETCH_RELEASES_CYCLES tool to get all cycles",
627
+ "3. Search the response for cycle with matching name 'Sprint 2'",
628
+ "4. Extract buildID and releaseID from the matching cycle",
629
+ "5. Use those IDs in cycle.buildID and cycle.releaseID parameters",
630
+ "6. If cycle name not found, inform user and list available cycles",
631
+ "Example workflow:",
632
+ "- User request: 'Update cycle Alpha_v1 name to Alpha_v1_Updated'",
633
+ "- Step 1: Call FETCH_RELEASES_CYCLES",
634
+ "- Step 2: Find cycle where name = 'Alpha_v1', get its buildID (e.g., 1494) and releaseID (e.g., 3729)",
635
+ "- Step 3: Call UPDATE_CYCLE with cycle.buildID = 1494 and cycle.releaseID = 3729",
636
+ "CYCLE IDENTIFICATION:",
637
+ "- NEVER assume or guess buildID or releaseID - always fetch from API",
638
+ "- Cycle names are user-defined strings (e.g., 'Sprint 2', 'Alpha_v1', 'Regression Cycle')",
639
+ "- buildID and releaseID are numeric identifiers assigned by QMetry",
640
+ "- Match cycle names case-insensitively when searching",
641
+ "- If multiple cycles match the name, ask user to clarify or use the most recent one",
642
+ "- FETCH_RELEASES_CYCLES returns: projects.releases[].builds[] array with name, buildID, and releaseID",
643
+ "Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
644
+ "Check your QMetry instance settings to determine the correct date format",
645
+ "NOTE: To verify/update the Date Format - Go to QMetry -> User Profile",
646
+ "If dates are in wrong format, QMetry will return an error - verify format with admin",
647
+ "You can update name, startDate, or targetDate independently or together",
648
+ "Only include the fields you want to update - other fields will remain unchanged",
649
+ "startDate and targetDate help with sprint planning and milestone tracking",
650
+ "Cycle hierarchy: Project → Release → Cycle → Test Execution",
651
+ "After updating a cycle, you can verify changes using FETCH_RELEASES_CYCLES tool",
652
+ "DIFFERENCE FROM CREATE_CYCLE: This tool updates an EXISTING cycle, while CREATE_CYCLE creates a new one",
653
+ ],
654
+ outputDescription: "JSON object containing the updated cycle details and confirmation of update",
655
+ readOnly: false,
656
+ idempotent: true,
657
+ },
348
658
  ];
@@ -30,7 +30,7 @@ export const REQUIREMENT_TOOLS = [
30
30
  description: "Get requirements with manual viewId (skip auto-resolution)",
31
31
  parameters: {
32
32
  projectKey: "MAC",
33
- viewId: 7397,
33
+ viewId: 7397, // This is an example viewId, must be resolved per project RQ viewId
34
34
  folderPath: "/APIARY 88",
35
35
  },
36
36
  expectedOutput: "Requirements using manually specified viewId 7397",