@smartbear/mcp 0.9.0 → 0.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 (43) hide show
  1. package/README.md +29 -4
  2. package/dist/api-hub/client/api.js +188 -0
  3. package/dist/api-hub/client/configuration.js +5 -0
  4. package/dist/api-hub/client/index.js +1 -0
  5. package/dist/api-hub/client/portal-types.js +126 -0
  6. package/dist/api-hub/client/tools.js +72 -15
  7. package/dist/api-hub/client/user-management-types.js +24 -0
  8. package/dist/api-hub/client.js +31 -0
  9. package/dist/bugsnag/client.js +4 -4
  10. package/dist/collaborator/client.js +364 -0
  11. package/dist/common/server.js +48 -20
  12. package/dist/index.js +9 -1
  13. package/dist/pactflow/client/tools.js +4 -4
  14. package/dist/qmetry/client/auto-resolve.js +22 -0
  15. package/dist/qmetry/client/handlers.js +18 -4
  16. package/dist/qmetry/client/issues.js +98 -1
  17. package/dist/qmetry/client/project.js +18 -1
  18. package/dist/qmetry/client/testcase.js +79 -1
  19. package/dist/qmetry/client/testsuite.js +156 -1
  20. package/dist/qmetry/client/tools/index.js +17 -0
  21. package/dist/qmetry/client/tools/issue-tools.js +545 -0
  22. package/dist/qmetry/client/tools/project-tools.js +348 -0
  23. package/dist/qmetry/client/tools/requirement-tools.js +530 -0
  24. package/dist/qmetry/client/tools/testcase-tools.js +526 -0
  25. package/dist/qmetry/client/tools/testsuite-tools.js +772 -0
  26. package/dist/qmetry/client/tools/types.js +1 -0
  27. package/dist/qmetry/client.js +9 -2
  28. package/dist/qmetry/config/constants.js +14 -0
  29. package/dist/qmetry/config/rest-endpoints.js +10 -0
  30. package/dist/qmetry/types/common.js +287 -2
  31. package/dist/qmetry/types/issues.js +11 -1
  32. package/dist/qmetry/types/project.js +7 -0
  33. package/dist/qmetry/types/testcase.js +6 -0
  34. package/dist/qmetry/types/testsuite.js +19 -1
  35. package/dist/zephyr/client.js +7 -1
  36. package/dist/zephyr/common/api-client.js +8 -0
  37. package/dist/zephyr/common/rest-api-schemas.js +5173 -0
  38. package/dist/zephyr/tool/project/get-project.js +39 -0
  39. package/dist/zephyr/tool/project/get-projects.js +7 -13
  40. package/dist/zephyr/tool/test-cycle/get-test-cycles.js +72 -0
  41. package/package.json +1 -1
  42. package/dist/qmetry/client/tools.js +0 -1673
  43. package/dist/zephyr/common/types.js +0 -35
@@ -0,0 +1,39 @@
1
+ import { getProjectParams, getProjectResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetProject {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Project",
9
+ summary: "Get details of project specified by id or key in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: getProjectParams,
13
+ outputSchema: getProjectResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the project with id 1",
17
+ parameters: {
18
+ projectIdOrKey: "1",
19
+ },
20
+ expectedOutput: "The project with its details",
21
+ },
22
+ {
23
+ description: "Get the project with key 'PROJ'",
24
+ parameters: {
25
+ projectIdOrKey: "PROJ",
26
+ },
27
+ expectedOutput: "The project with its details",
28
+ },
29
+ ],
30
+ };
31
+ handle = async (args) => {
32
+ const { projectIdOrKey } = getProjectParams.parse(args);
33
+ const response = await this.apiClient.get(`/projects/${projectIdOrKey}`);
34
+ return {
35
+ structuredContent: response,
36
+ content: [],
37
+ };
38
+ };
39
+ }
@@ -1,9 +1,4 @@
1
- import { z } from "zod";
2
- import { MaxResultsSchema, StartAtSchema } from "../../common/types.js";
3
- export const GetProjectsInputSchema = z.object({
4
- startAt: StartAtSchema.optional(),
5
- maxResults: MaxResultsSchema.optional(),
6
- });
1
+ import { listProjectsQueryParams, listProjectsResponse, } from "../../common/rest-api-schemas.js";
7
2
  export class GetProjects {
8
3
  apiClient;
9
4
  constructor(apiClient) {
@@ -14,7 +9,8 @@ export class GetProjects {
14
9
  summary: "Get details of projects in Zephyr",
15
10
  readOnly: true,
16
11
  idempotent: true,
17
- zodSchema: GetProjectsInputSchema,
12
+ inputSchema: listProjectsQueryParams,
13
+ outputSchema: listProjectsResponse,
18
14
  examples: [
19
15
  {
20
16
  description: "Get the first 10 projects",
@@ -42,13 +38,11 @@ export class GetProjects {
42
38
  ],
43
39
  };
44
40
  handle = async (args) => {
45
- const { maxResults, startAt } = args;
46
- const response = await this.apiClient.get("/projects", {
47
- maxResults,
48
- startAt,
49
- });
41
+ const parsedArgs = listProjectsQueryParams.parse(args);
42
+ const response = await this.apiClient.get("/projects", parsedArgs);
50
43
  return {
51
- content: [{ type: "text", text: JSON.stringify(response) }],
44
+ structuredContent: response,
45
+ content: [],
52
46
  };
53
47
  };
54
48
  }
@@ -0,0 +1,72 @@
1
+ import { listTestCyclesQueryParams, listTestCyclesResponse, } from "../../common/rest-api-schemas.js";
2
+ export class GetTestCycles {
3
+ apiClient;
4
+ constructor(apiClient) {
5
+ this.apiClient = apiClient;
6
+ }
7
+ specification = {
8
+ title: "Get Test Cycles",
9
+ summary: "Get details of Test Cycles in Zephyr",
10
+ readOnly: true,
11
+ idempotent: true,
12
+ inputSchema: listTestCyclesQueryParams,
13
+ outputSchema: listTestCyclesResponse,
14
+ examples: [
15
+ {
16
+ description: "Get the first 10 Test Cycles",
17
+ parameters: {
18
+ maxResults: 10,
19
+ startAt: 0,
20
+ },
21
+ expectedOutput: "The first 10 Test Cycles with their details",
22
+ },
23
+ {
24
+ description: "Get any Test Cycle",
25
+ parameters: {
26
+ maxResults: 1,
27
+ },
28
+ expectedOutput: "One Test Cycle with its details",
29
+ },
30
+ {
31
+ description: "Get five Test Cycles starting from the 7th Test Cycles of the list",
32
+ parameters: {
33
+ maxResults: 5,
34
+ startAt: 6,
35
+ },
36
+ expectedOutput: "The 7th to the 11th Test Cycles with their details",
37
+ },
38
+ {
39
+ description: "Get one Test Cycle from the project PROJ",
40
+ parameters: {
41
+ projectKey: "PROJ",
42
+ maxResults: 1,
43
+ },
44
+ expectedOutput: "One Test Cycle from project PROJ with its details",
45
+ },
46
+ {
47
+ description: "Get one Test Cycle from the folder 123",
48
+ parameters: {
49
+ folderId: 123,
50
+ maxResults: 1,
51
+ },
52
+ expectedOutput: "One Test Cycle from folder 123 with its details",
53
+ },
54
+ {
55
+ description: "Get one Test Cycle from the version 456",
56
+ parameters: {
57
+ jiraProjectVersionId: 456,
58
+ maxResults: 1,
59
+ },
60
+ expectedOutput: "One Test Cycle from version 456 with its details",
61
+ },
62
+ ],
63
+ };
64
+ handle = async (args) => {
65
+ const parsedArgs = listTestCyclesQueryParams.parse(args);
66
+ const response = await this.apiClient.get("/testcycles", parsedArgs);
67
+ return {
68
+ structuredContent: response,
69
+ content: [],
70
+ };
71
+ };
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbear/mcp",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "MCP server for interacting SmartBear Products",
5
5
  "keywords": [
6
6
  "smartbear",