@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
@@ -0,0 +1,49 @@
1
+ import { listStatusesQueryParams, listStatusesResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetStatuses {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Statuses",
9
+ summary: "Get statuses of different types of test artifacts in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: listStatusesQueryParams,
13
+ outputSchema: listStatusesResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the first 10 statuses",
17
+ parameters: {
18
+ maxResults: 10,
19
+ startAt: 0,
20
+ },
21
+ expectedOutput: "The first 10 statuses with their details from different projects and test artifact types",
22
+ },
23
+ {
24
+ description: "Get 10 test case statuses",
25
+ parameters: {
26
+ maxResults: 10,
27
+ statusType: "TEST_CASE",
28
+ },
29
+ expectedOutput: "A list of statuses related to test cases with their details",
30
+ },
31
+ {
32
+ description: "Get five statuses from the project PROJ",
33
+ parameters: {
34
+ maxResults: 5,
35
+ projectKey: "PROJ",
36
+ },
37
+ expectedOutput: "The first five statuses from the project PROJ with their details",
38
+ },
39
+ ],
40
+ };
41
+ handle = async (args) => {
42
+ const getStatusesInput = listStatusesQueryParams.parse(args);
43
+ const response = await this.apiClient.get("/statuses", getStatusesInput);
44
+ return {
45
+ structuredContent: response,
46
+ content: [],
47
+ };
48
+ };
49
+ }
@@ -0,0 +1,39 @@
1
+ import { getTestCaseParams, getTestCaseResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestCase {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Case",
9
+ summary: "Get details of test case specified by key in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: getTestCaseParams,
13
+ outputSchema: getTestCaseResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the test case with key 'SA-T10'",
17
+ parameters: {
18
+ testCaseKey: "SA-T10",
19
+ },
20
+ expectedOutput: "The test case with its details",
21
+ },
22
+ {
23
+ description: "Get the test case with key 'MM2-T1'",
24
+ parameters: {
25
+ testCaseKey: "MM2-T1",
26
+ },
27
+ expectedOutput: "The test case with its details",
28
+ },
29
+ ],
30
+ };
31
+ handle = async (args) => {
32
+ const { testCaseKey } = getTestCaseParams.parse(args);
33
+ const response = await this.apiClient.get(`/testcases/${testCaseKey}`);
34
+ return {
35
+ structuredContent: response,
36
+ content: [],
37
+ };
38
+ };
39
+ }
@@ -0,0 +1,64 @@
1
+ import { listTestCasesCursorPaginatedQueryParams, listTestCasesCursorPaginatedResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestCases {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Cases",
9
+ summary: "Get details of test cases in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: listTestCasesCursorPaginatedQueryParams,
13
+ outputSchema: listTestCasesCursorPaginatedResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the first 10 Test Cases",
17
+ parameters: {
18
+ limit: 10,
19
+ startAtId: 1,
20
+ },
21
+ expectedOutput: "The first 10 Test Cases with their details",
22
+ },
23
+ {
24
+ description: "Get any Test Case",
25
+ parameters: {
26
+ limit: 1,
27
+ },
28
+ expectedOutput: "One Test Case with its details",
29
+ },
30
+ {
31
+ description: "Get five Test Cases starting from the ID 123",
32
+ parameters: {
33
+ limit: 5,
34
+ startAtId: 123,
35
+ },
36
+ expectedOutput: "Five Test Cases starting from the ID 123 with their details",
37
+ },
38
+ {
39
+ description: "Get one Test Case from the project PROJ",
40
+ parameters: {
41
+ projectKey: "PROJ",
42
+ limit: 1,
43
+ },
44
+ expectedOutput: "One Test Case from project PROJ with its details",
45
+ },
46
+ {
47
+ description: "Get one Test Case from the folder with ID 123",
48
+ parameters: {
49
+ folderId: 123,
50
+ limit: 1,
51
+ },
52
+ expectedOutput: "One Test Case from folder with ID 123 with its details",
53
+ },
54
+ ],
55
+ };
56
+ handle = async (args) => {
57
+ const parsedArgs = listTestCasesCursorPaginatedQueryParams.parse(args);
58
+ const response = await this.apiClient.get("/testcases/nextgen", parsedArgs);
59
+ return {
60
+ structuredContent: response,
61
+ content: [],
62
+ };
63
+ };
64
+ }
@@ -0,0 +1,39 @@
1
+ import { getTestCycleParams, getTestCycleResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestCycle {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Cycle",
9
+ summary: "Get details of test cycle specified by id or key in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: getTestCycleParams,
13
+ outputSchema: getTestCycleResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the test cycle with id 1",
17
+ parameters: {
18
+ testCycleIdOrKey: "1",
19
+ },
20
+ expectedOutput: "The test cycle with its details",
21
+ },
22
+ {
23
+ description: "Get the test cycle with key 'SA-R40'",
24
+ parameters: {
25
+ testCycleIdOrKey: "SA-R40",
26
+ },
27
+ expectedOutput: "The test cycle with its details",
28
+ },
29
+ ],
30
+ };
31
+ handle = async (args) => {
32
+ const { testCycleIdOrKey } = getTestCycleParams.parse(args);
33
+ const response = await this.apiClient.get(`/testcycles/${testCycleIdOrKey}`);
34
+ return {
35
+ structuredContent: response,
36
+ content: [],
37
+ };
38
+ };
39
+ }
@@ -44,12 +44,12 @@ export class GetTestCycles {
44
44
  expectedOutput: "One Test Cycle from project PROJ with its details",
45
45
  },
46
46
  {
47
- description: "Get one Test Cycle from the folder 123",
47
+ description: "Get one Test Cycle from the folder with ID 123",
48
48
  parameters: {
49
49
  folderId: 123,
50
50
  maxResults: 1,
51
51
  },
52
- expectedOutput: "One Test Cycle from folder 123 with its details",
52
+ expectedOutput: "One Test Cycle from folder with ID 123 with its details",
53
53
  },
54
54
  {
55
55
  description: "Get one Test Cycle from the version 456",
@@ -0,0 +1,39 @@
1
+ import { getTestExecutionParams, getTestExecutionResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestExecution {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Execution",
9
+ summary: "Get details of test execution specified by id or key in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: getTestExecutionParams,
13
+ outputSchema: getTestExecutionResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the test execution with id 1",
17
+ parameters: {
18
+ testExecutionIdOrKey: "1",
19
+ },
20
+ expectedOutput: "The test execution with its details",
21
+ },
22
+ {
23
+ description: "Get the test execution with key 'PROJ-E123'",
24
+ parameters: {
25
+ testExecutionIdOrKey: "PROJ-E123",
26
+ },
27
+ expectedOutput: "The test execution with its details",
28
+ },
29
+ ],
30
+ };
31
+ handle = async (args) => {
32
+ const { testExecutionIdOrKey } = getTestExecutionParams.parse(args);
33
+ const response = await this.apiClient.get(`/testexecutions/${testExecutionIdOrKey}`);
34
+ return {
35
+ structuredContent: response,
36
+ content: [],
37
+ };
38
+ };
39
+ }
@@ -0,0 +1,45 @@
1
+ import { listTestExecutionsNextgenQueryParams, listTestExecutionsNextgenResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestExecutions {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Executions",
9
+ summary: "Get test executions with optional filters",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: listTestExecutionsNextgenQueryParams,
13
+ outputSchema: listTestExecutionsNextgenResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the first 10 test executions",
17
+ parameters: { limit: 10, startAtId: 0 },
18
+ expectedOutput: "The first 10 test executions with their details",
19
+ },
20
+ {
21
+ description: "Get 5 test executions for the project PROJ",
22
+ parameters: { projectKey: "PROJ", limit: 5 },
23
+ expectedOutput: "Up to 5 test executions for project PROJ",
24
+ },
25
+ {
26
+ description: "Get some test executions that finished after 01/Jan/2024",
27
+ parameters: { actualEndDateAfter: "2024-01-01T00:00:00Z" },
28
+ expectedOutput: "Test executions that ended after 2024-01-01",
29
+ },
30
+ {
31
+ description: "Get test executions with step links included",
32
+ parameters: { includeStepLinks: true },
33
+ expectedOutput: "Test executions with step links included",
34
+ },
35
+ ],
36
+ };
37
+ handle = async (args) => {
38
+ const parsedArgs = listTestExecutionsNextgenQueryParams.parse(args);
39
+ const response = await this.apiClient.get("/testexecutions/nextgen", parsedArgs);
40
+ return {
41
+ structuredContent: response,
42
+ content: [],
43
+ };
44
+ };
45
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smartbear/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "MCP server for interacting SmartBear Products",
5
5
  "keywords": [
6
6
  "smartbear",
7
7
  "mcp",
8
8
  "bugsnag",
9
9
  "reflect",
10
- "api-hub",
10
+ "swagger",
11
11
  "pactflow",
12
12
  "zephyr"
13
13
  ],
@@ -43,7 +43,8 @@
43
43
  "test:coverage": "vitest --coverage",
44
44
  "test:coverage:ci": "vitest --coverage --reporter=verbose",
45
45
  "test:run": "vitest run",
46
- "coverage:check": "vitest --coverage --reporter=verbose --config vitest.config.coverage.ts"
46
+ "coverage:check": "vitest --coverage --reporter=verbose --config vitest.config.coverage.ts",
47
+ "bump": "node scripts/bump.js"
47
48
  },
48
49
  "dependencies": {
49
50
  "@bugsnag/js": "^8.2.0",