@smartbear/mcp 0.14.1 → 0.16.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 (68) hide show
  1. package/README.md +1 -1
  2. package/dist/bugsnag/client.js +47 -1340
  3. package/dist/bugsnag/input-schemas.js +18 -18
  4. package/dist/bugsnag/tool/error/get-error.js +98 -0
  5. package/dist/bugsnag/tool/error/list-project-errors.js +102 -0
  6. package/dist/bugsnag/tool/error/update-error.js +256 -0
  7. package/dist/bugsnag/tool/event/get-event-details-from-dashboard-url.js +55 -0
  8. package/dist/bugsnag/tool/event/get-event.js +38 -0
  9. package/dist/bugsnag/tool/performance/get-network-endpoint-groupings.js +46 -0
  10. package/dist/bugsnag/tool/performance/get-span-group.js +73 -0
  11. package/dist/bugsnag/tool/performance/get-trace.js +83 -0
  12. package/dist/bugsnag/tool/performance/list-span-groups.js +111 -0
  13. package/dist/bugsnag/tool/performance/list-spans.js +97 -0
  14. package/dist/bugsnag/tool/performance/list-trace-fields.js +41 -0
  15. package/dist/bugsnag/tool/performance/set-network-endpoint-groupings.js +90 -0
  16. package/dist/bugsnag/tool/project/get-current-project.js +31 -0
  17. package/dist/bugsnag/tool/project/list-project-event-filters.js +42 -0
  18. package/dist/bugsnag/tool/project/list-projects.js +43 -0
  19. package/dist/bugsnag/tool/release/get-build.js +50 -0
  20. package/dist/bugsnag/tool/release/get-release.js +68 -0
  21. package/dist/bugsnag/tool/release/list-releases.js +88 -0
  22. package/dist/common/prompts.js +9 -0
  23. package/dist/common/server.js +16 -0
  24. package/dist/common/transport-http.js +2 -0
  25. package/dist/package.json.js +1 -1
  26. package/dist/qmetry/client/api/client-api.js +2 -1
  27. package/dist/qmetry/client/automation.js +2 -1
  28. package/dist/qmetry/client/tools/testcase-tools.js +269 -1
  29. package/dist/qmetry/client/tools/testsuite-tools.js +1 -1
  30. package/dist/reflect/client.js +82 -255
  31. package/dist/reflect/config/constants.js +8 -0
  32. package/dist/reflect/prompt/sap-test.js +29 -0
  33. package/dist/reflect/tool/recording/add-prompt-step.js +60 -0
  34. package/dist/reflect/tool/recording/add-segment.js +56 -0
  35. package/dist/reflect/tool/recording/connect-to-session.js +89 -0
  36. package/dist/reflect/tool/recording/delete-previous-step.js +47 -0
  37. package/dist/reflect/tool/recording/get-screenshot.js +55 -0
  38. package/dist/reflect/tool/suites/cancel-suite-execution.js +50 -0
  39. package/dist/reflect/tool/suites/execute-suite.js +40 -0
  40. package/dist/reflect/tool/suites/get-suite-execution-status.js +50 -0
  41. package/dist/reflect/tool/suites/list-suite-executions.js +40 -0
  42. package/dist/reflect/tool/suites/list-suites.js +27 -0
  43. package/dist/reflect/tool/tests/get-test-status.js +42 -0
  44. package/dist/reflect/tool/tests/list-segments.js +68 -0
  45. package/dist/reflect/tool/tests/list-tests.js +27 -0
  46. package/dist/reflect/tool/tests/run-test.js +40 -0
  47. package/dist/reflect/websocket-manager.js +92 -0
  48. package/dist/zephyr/client.js +35 -1
  49. package/dist/zephyr/common/rest-api-schemas.js +463 -477
  50. package/dist/zephyr/tool/folder/create-folder.js +55 -0
  51. package/dist/zephyr/tool/issue-link/get-test-cases.js +33 -0
  52. package/dist/zephyr/tool/issue-link/get-test-cycles.js +32 -0
  53. package/dist/zephyr/tool/issue-link/get-test-executions.js +32 -0
  54. package/dist/zephyr/tool/test-case/create-issue-link.js +38 -0
  55. package/dist/zephyr/tool/test-case/create-test-script.js +57 -0
  56. package/dist/zephyr/tool/test-case/create-test-steps.js +91 -0
  57. package/dist/zephyr/tool/test-case/create-web-link.js +5 -2
  58. package/dist/zephyr/tool/test-case/get-links.js +32 -0
  59. package/dist/zephyr/tool/test-case/get-test-script.js +46 -0
  60. package/dist/zephyr/tool/test-case/get-test-steps.js +56 -0
  61. package/dist/zephyr/tool/test-cycle/create-issue-link.js +45 -0
  62. package/dist/zephyr/tool/test-cycle/create-web-link.js +56 -0
  63. package/dist/zephyr/tool/test-cycle/get-links.js +39 -0
  64. package/dist/zephyr/tool/test-execution/create-issue-link.js +45 -0
  65. package/dist/zephyr/tool/test-execution/get-test-execution-links.js +39 -0
  66. package/dist/zephyr/tool/test-execution/get-test-steps.js +75 -0
  67. package/dist/zephyr/tool/test-execution/update-test-execution.js +73 -0
  68. package/package.json +11 -9
@@ -0,0 +1,55 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateFolder201Response, CreateFolderBody } from "../../common/rest-api-schemas.js";
3
+ class CreateFolder extends Tool {
4
+ specification = {
5
+ title: "Create Folder",
6
+ summary: "Create a folder called 'Axial Pump Tests' in the project SA for organizing test cases",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateFolderBody,
10
+ outputSchema: CreateFolder201Response,
11
+ examples: [
12
+ {
13
+ description: "Create a root Folder in project SA for organizing test cases",
14
+ parameters: {
15
+ parentId: null,
16
+ name: "Axial Pump Tests",
17
+ projectKey: "SA",
18
+ folderType: "TEST_CASE"
19
+ },
20
+ expectedOutput: "The newly created Folder with its ID and self link"
21
+ },
22
+ {
23
+ description: "Create a sub-folder under folder ID 5 in the project MM2 for test plans related to pumps",
24
+ parameters: {
25
+ parentId: 5,
26
+ name: "Pump-related Test Plans",
27
+ projectKey: "MM2",
28
+ folderType: "TEST_PLAN"
29
+ },
30
+ expectedOutput: "The newly created Folder with its ID and self link"
31
+ },
32
+ {
33
+ description: "Create a Folder called 'Regression Cycles' in project TIS for organizing test cycles",
34
+ parameters: {
35
+ parentId: null,
36
+ name: "Regression Cycles",
37
+ projectKey: "TIS",
38
+ folderType: "TEST_CYCLE"
39
+ },
40
+ expectedOutput: "The newly created Folder with its ID and self link"
41
+ }
42
+ ]
43
+ };
44
+ handle = async (args) => {
45
+ const body = CreateFolderBody.parse(args);
46
+ const response = await this.client.getApiClient().post(`/folders`, body);
47
+ return {
48
+ structuredContent: response,
49
+ content: []
50
+ };
51
+ };
52
+ }
53
+ export {
54
+ CreateFolder
55
+ };
@@ -0,0 +1,33 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetIssueLinkTestCases200Response, GetIssueLinkTestCasesParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestCases extends Tool {
4
+ specification = {
5
+ title: "Get Issue Link Test Cases",
6
+ summary: "Get test cases linked to a Jira issue in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetIssueLinkTestCasesParams,
10
+ outputSchema: GetIssueLinkTestCases200Response,
11
+ examples: [
12
+ {
13
+ description: "Check which test cases are linked to Jira issue PROJ-123",
14
+ parameters: {
15
+ issueKey: "PROJ-123"
16
+ },
17
+ expectedOutput: "The List of test cases linked to Jira issue PROJ-123 with their keys and versions"
18
+ }
19
+ ]
20
+ };
21
+ handle = async (args) => {
22
+ const { issueKey } = GetIssueLinkTestCasesParams.parse(args);
23
+ const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/testcases`);
24
+ return {
25
+ // requires structuredContent to be a record, not an array.
26
+ structuredContent: { testCases: response },
27
+ content: []
28
+ };
29
+ };
30
+ }
31
+ export {
32
+ GetTestCases
33
+ };
@@ -0,0 +1,32 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetIssueLinkTestCycles200Response, GetIssueLinkTestCyclesParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestCycles extends Tool {
4
+ specification = {
5
+ title: "Get Test Cycles linked to a Jira issue",
6
+ summary: "Get test cycles linked to a Jira issue in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetIssueLinkTestCyclesParams,
10
+ outputSchema: GetIssueLinkTestCycles200Response,
11
+ examples: [
12
+ {
13
+ description: "Check which test cycles are linked to Jira issue PROJ-123",
14
+ parameters: {
15
+ issueKey: "PROJ-123"
16
+ },
17
+ expectedOutput: "The List of test cycles linked to Jira issue PROJ-123 with their IDs"
18
+ }
19
+ ]
20
+ };
21
+ handle = async (args) => {
22
+ const { issueKey } = GetIssueLinkTestCyclesParams.parse(args);
23
+ const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/testcycles`);
24
+ return {
25
+ structuredContent: { testCycles: response },
26
+ content: []
27
+ };
28
+ };
29
+ }
30
+ export {
31
+ GetTestCycles
32
+ };
@@ -0,0 +1,32 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetIssueLinkTestExecutions200Response, GetIssueLinkTestExecutionsParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestExecutions extends Tool {
4
+ specification = {
5
+ title: "Get test executions linked to a Jira issue",
6
+ summary: "Get test executions linked to a Jira issue in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetIssueLinkTestExecutionsParams,
10
+ outputSchema: GetIssueLinkTestExecutions200Response,
11
+ examples: [
12
+ {
13
+ description: "Check which test executions are linked to Jira issue PROJ-123",
14
+ parameters: {
15
+ issueKey: "PROJ-123"
16
+ },
17
+ expectedOutput: "The List of test executions linked to Jira issue PROJ-123 with their keys and versions"
18
+ }
19
+ ]
20
+ };
21
+ handle = async (args) => {
22
+ const { issueKey } = GetIssueLinkTestExecutionsParams.parse(args);
23
+ const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/executions`);
24
+ return {
25
+ structuredContent: { testExecutions: response },
26
+ content: []
27
+ };
28
+ };
29
+ }
30
+ export {
31
+ GetTestExecutions
32
+ };
@@ -0,0 +1,38 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateTestCaseIssueLink201Response, CreateTestCaseIssueLinkParams, CreateTestCaseIssueLinkBody } from "../../common/rest-api-schemas.js";
3
+ class CreateTestCaseIssueLink extends Tool {
4
+ specification = {
5
+ title: "Create Test Case Issue Link",
6
+ summary: "Create a new link between an issue in Jira and a Test Case in Zephyr",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateTestCaseIssueLinkParams.and(
10
+ CreateTestCaseIssueLinkBody.partial()
11
+ ),
12
+ outputSchema: CreateTestCaseIssueLink201Response,
13
+ examples: [
14
+ {
15
+ description: "Create a link between the test case SA-T1 and the Jira Issue ID 10100",
16
+ parameters: {
17
+ testCaseKey: "SA-T1",
18
+ issueId: "10100"
19
+ },
20
+ expectedOutput: "The newly created Issue Link with its ID and self link"
21
+ }
22
+ ]
23
+ };
24
+ handle = async (args) => {
25
+ const parsed = CreateTestCaseIssueLinkParams.and(
26
+ CreateTestCaseIssueLinkBody
27
+ ).parse(args);
28
+ const { testCaseKey, ...body } = parsed;
29
+ const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/links/issues`, body);
30
+ return {
31
+ structuredContent: response,
32
+ content: []
33
+ };
34
+ };
35
+ }
36
+ export {
37
+ CreateTestCaseIssueLink
38
+ };
@@ -0,0 +1,57 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateTestCaseTestScript201Response, CreateTestCaseTestScriptParams, CreateTestCaseTestScriptBody } from "../../common/rest-api-schemas.js";
3
+ class CreateTestScript extends Tool {
4
+ specification = {
5
+ title: "Create Test Script",
6
+ summary: "Create a new Test Script of the types Plain Text or BDD in a Zephyr Test Case.",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateTestCaseTestScriptParams.and(
10
+ CreateTestCaseTestScriptBody.partial()
11
+ ),
12
+ outputSchema: CreateTestCaseTestScript201Response,
13
+ examples: [
14
+ {
15
+ description: "Create a plain text test script for test case SA-T1 to verify that the axial pump can be enabled",
16
+ parameters: {
17
+ testCaseKey: "SA-T1",
18
+ type: "plain",
19
+ text: "1. Navigate to Pump Settings</br>2. Enable Axial Pump</br>3. Verify pump status is 'Active'"
20
+ },
21
+ expectedOutput: "The created test script metadata including its id and self link"
22
+ },
23
+ {
24
+ description: "Create a BDD test script for test case MM2-T15 to validate axial pump activation",
25
+ parameters: {
26
+ testCaseKey: "MM2-T15",
27
+ type: "bdd",
28
+ text: "Given the axial pump is installed\nWhen the user enables the axial pump\nThen the pump status should be Active"
29
+ },
30
+ expectedOutput: "The created test script metadata including its id and self link"
31
+ },
32
+ {
33
+ description: "Create a BDD test script for test case QA-T100 for axial pump performance validation",
34
+ parameters: {
35
+ testCaseKey: "QA-T100",
36
+ type: "bdd",
37
+ text: "Given the system is running\nWhen the axial pump operates under load\nThen performance metrics should remain within thresholds"
38
+ },
39
+ expectedOutput: "The created test script metadata including its id and self link"
40
+ }
41
+ ]
42
+ };
43
+ handle = async (args) => {
44
+ const parsed = CreateTestCaseTestScriptParams.and(
45
+ CreateTestCaseTestScriptBody
46
+ ).parse(args);
47
+ const { testCaseKey, ...body } = parsed;
48
+ const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/testscript`, body);
49
+ return {
50
+ structuredContent: response,
51
+ content: []
52
+ };
53
+ };
54
+ }
55
+ export {
56
+ CreateTestScript
57
+ };
@@ -0,0 +1,91 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateTestCaseTestSteps201Response, CreateTestCaseTestStepsParams, CreateTestCaseTestStepsBody } from "../../common/rest-api-schemas.js";
3
+ class CreateTestSteps extends Tool {
4
+ specification = {
5
+ title: "Create Test Case Steps",
6
+ summary: "Create steps for a Test Case in Zephyr. Supports inline step definitions or delegating execution to another test case (also known as 'call to test' via UI).",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateTestCaseTestStepsParams.and(
10
+ CreateTestCaseTestStepsBody.partial()
11
+ ),
12
+ outputSchema: CreateTestCaseTestSteps201Response,
13
+ examples: [
14
+ {
15
+ description: "To the Test Case SA-T1, add steps that will test a login page.",
16
+ parameters: {
17
+ testCaseKey: "SA-T1",
18
+ mode: "APPEND",
19
+ items: [
20
+ {
21
+ inline: {
22
+ description: "Navigate to the login page",
23
+ expectedResult: "Login page is displayed"
24
+ }
25
+ },
26
+ {
27
+ inline: {
28
+ description: "Enter valid credentials and click Submit",
29
+ expectedResult: "User is redirected to the dashboard"
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
35
+ },
36
+ {
37
+ description: "To the Test Case MM2-T15, replace all existing steps with new ones that test the settings page for an Admin user.",
38
+ parameters: {
39
+ testCaseKey: "MM2-T15",
40
+ mode: "OVERWRITE",
41
+ items: [
42
+ {
43
+ inline: {
44
+ description: "Open the settings page",
45
+ testData: "User role: Admin",
46
+ expectedResult: "Settings page is accessible"
47
+ }
48
+ },
49
+ {
50
+ inline: {
51
+ description: "Change the notification preference",
52
+ testData: "Preference: Email only",
53
+ expectedResult: "Notification preference is updated successfully"
54
+ }
55
+ }
56
+ ]
57
+ },
58
+ expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
59
+ },
60
+ {
61
+ description: "To the Test Case SA-T1, add a step that reuses the steps from the Test Case PRJ-T42",
62
+ parameters: {
63
+ testCaseKey: "SA-T1",
64
+ mode: "APPEND",
65
+ items: [
66
+ {
67
+ testCase: {
68
+ testCaseKey: "PRJ-T42"
69
+ }
70
+ }
71
+ ]
72
+ },
73
+ expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
74
+ }
75
+ ]
76
+ };
77
+ handle = async (args) => {
78
+ const parsed = CreateTestCaseTestStepsParams.and(
79
+ CreateTestCaseTestStepsBody
80
+ ).parse(args);
81
+ const { testCaseKey, ...body } = parsed;
82
+ const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/teststeps`, body);
83
+ return {
84
+ structuredContent: response,
85
+ content: []
86
+ };
87
+ };
88
+ }
89
+ export {
90
+ CreateTestSteps
91
+ };
@@ -32,8 +32,11 @@ class CreateTestCaseWebLink extends Tool {
32
32
  ]
33
33
  };
34
34
  handle = async (args) => {
35
- const { testCaseKey } = CreateTestCaseWebLinkParams.parse(args);
36
- const body = CreateTestCaseWebLinkBody.parse(args);
35
+ const fullInputSchema = CreateTestCaseWebLinkBody.extend({
36
+ testCaseKey: CreateTestCaseWebLinkParams.shape.testCaseKey
37
+ });
38
+ const parsed = fullInputSchema.parse(args);
39
+ const { testCaseKey, ...body } = parsed;
37
40
  const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/links/weblinks`, body);
38
41
  return {
39
42
  structuredContent: response,
@@ -0,0 +1,32 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetTestCaseLinks200Response, GetTestCaseLinksParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestCaseLinks extends Tool {
4
+ specification = {
5
+ title: "Get Test Case Links",
6
+ summary: "Get all links (issue links and web links) associated with a test case in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetTestCaseLinksParams,
10
+ outputSchema: GetTestCaseLinks200Response,
11
+ examples: [
12
+ {
13
+ description: "Get all links associated with the test case with key 'SA-T10'",
14
+ parameters: {
15
+ testCaseKey: "SA-T10"
16
+ },
17
+ expectedOutput: "The links (issue links and web links) associated with the test case"
18
+ }
19
+ ]
20
+ };
21
+ handle = async (args) => {
22
+ const { testCaseKey } = GetTestCaseLinksParams.parse(args);
23
+ const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/links`);
24
+ return {
25
+ structuredContent: response,
26
+ content: []
27
+ };
28
+ };
29
+ }
30
+ export {
31
+ GetTestCaseLinks
32
+ };
@@ -0,0 +1,46 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetTestCaseTestScript200Response, GetTestCaseTestScriptParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestScript extends Tool {
4
+ specification = {
5
+ title: "Get Test Script",
6
+ summary: "Get the Test Script (Plain Text or BDD) for a given Test Case in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetTestCaseTestScriptParams,
10
+ outputSchema: GetTestCaseTestScript200Response,
11
+ examples: [
12
+ {
13
+ description: "Get the test script for test case with key 'SA-T1'",
14
+ parameters: {
15
+ testCaseKey: "SA-T1"
16
+ },
17
+ expectedOutput: "The test script with its type (plain or bdd), text content, and id"
18
+ },
19
+ {
20
+ description: "Retrieve the BDD test script content for test case with key 'MM2-T15'",
21
+ parameters: {
22
+ testCaseKey: "MM2-T15"
23
+ },
24
+ expectedOutput: "The test script with its type (plain or bdd), text content, and id"
25
+ },
26
+ {
27
+ description: "Get the test script for test case with key 'QA-T100' to review the test instructions",
28
+ parameters: {
29
+ testCaseKey: "QA-T100"
30
+ },
31
+ expectedOutput: "The test script with its type (plain or bdd), text content, and id"
32
+ }
33
+ ]
34
+ };
35
+ handle = async (args) => {
36
+ const { testCaseKey } = GetTestCaseTestScriptParams.parse(args);
37
+ const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/testscript`);
38
+ return {
39
+ structuredContent: response,
40
+ content: []
41
+ };
42
+ };
43
+ }
44
+ export {
45
+ GetTestScript
46
+ };
@@ -0,0 +1,56 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetTestCaseTestSteps200Response, GetTestCaseTestStepsParams, GetTestCaseTestStepsQueryParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestCaseSteps extends Tool {
4
+ specification = {
5
+ title: "Get Test Case Steps",
6
+ summary: "Get details of test case steps in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetTestCaseTestStepsParams.and(
10
+ GetTestCaseTestStepsQueryParams.partial()
11
+ ),
12
+ outputSchema: GetTestCaseTestSteps200Response,
13
+ examples: [
14
+ {
15
+ description: "Get the first 10 test case steps for test case with key 'SA-T1'",
16
+ parameters: {
17
+ testCaseKey: "SA-T1",
18
+ maxResults: 10,
19
+ startAt: 0
20
+ },
21
+ expectedOutput: "The first 10 test case steps with their details"
22
+ },
23
+ {
24
+ description: "Get any test case step for test case with key 'SA-T1'",
25
+ parameters: {
26
+ testCaseKey: "SA-T1",
27
+ maxResults: 1
28
+ },
29
+ expectedOutput: "One test case step with its details"
30
+ },
31
+ {
32
+ description: "Get five test case steps starting from the 7th test case step of the list for test case with key 'SA-T1'",
33
+ parameters: {
34
+ testCaseKey: "SA-T1",
35
+ maxResults: 5,
36
+ startAt: 6
37
+ },
38
+ expectedOutput: "The 7th to the 11th test case steps with their details"
39
+ }
40
+ ]
41
+ };
42
+ handle = async (args) => {
43
+ const parsed = GetTestCaseTestStepsParams.and(
44
+ GetTestCaseTestStepsQueryParams
45
+ ).parse(args);
46
+ const { testCaseKey, ...parsedArgs } = parsed;
47
+ const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/teststeps`, parsedArgs);
48
+ return {
49
+ structuredContent: response,
50
+ content: []
51
+ };
52
+ };
53
+ }
54
+ export {
55
+ GetTestCaseSteps
56
+ };
@@ -0,0 +1,45 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateTestCycleIssueLinkParams, CreateTestCycleIssueLinkBody } from "../../common/rest-api-schemas.js";
3
+ class CreateTestCycleIssueLink extends Tool {
4
+ specification = {
5
+ title: "Create Test Cycle Issue Link",
6
+ summary: "Create a new link between an issue in Jira and a Test Cycle in Zephyr",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateTestCycleIssueLinkParams.and(
10
+ CreateTestCycleIssueLinkBody
11
+ ),
12
+ examples: [
13
+ {
14
+ description: "Create a link between the test cycle with key SA-R1 and the Jira Issue ID 10100",
15
+ parameters: {
16
+ testCycleIdOrKey: "SA-R1",
17
+ issueId: 10100
18
+ },
19
+ expectedOutput: "The link between Test Cycle and Jira issue should be created, but no output is expected."
20
+ },
21
+ {
22
+ description: "Create a link between the test cycle with ID 1001 and the Jira issue ID 20200",
23
+ parameters: {
24
+ testCycleIdOrKey: "1001",
25
+ issueId: 20200
26
+ },
27
+ expectedOutput: "The link between Test Cycle and Jira issue should be created, but no output is expected."
28
+ }
29
+ ]
30
+ };
31
+ handle = async (args) => {
32
+ const parsed = CreateTestCycleIssueLinkParams.and(
33
+ CreateTestCycleIssueLinkBody
34
+ ).parse(args);
35
+ const { testCycleIdOrKey, ...body } = parsed;
36
+ await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/issues`, body);
37
+ return {
38
+ structuredContent: {},
39
+ content: []
40
+ };
41
+ };
42
+ }
43
+ export {
44
+ CreateTestCycleIssueLink
45
+ };
@@ -0,0 +1,56 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { CreateTestCycleWebLinkParams, CreateTestCycleWebLinkBody } from "../../common/rest-api-schemas.js";
3
+ class CreateTestCycleWebLink extends Tool {
4
+ specification = {
5
+ title: "Create Test Cycle Web Link",
6
+ summary: "Create a new Web Link for a Test Cycle in Zephyr",
7
+ readOnly: false,
8
+ idempotent: false,
9
+ inputSchema: CreateTestCycleWebLinkParams.and(
10
+ CreateTestCycleWebLinkBody.partial()
11
+ ),
12
+ examples: [
13
+ {
14
+ description: "Create a link between the specified test cycle by Id '100001' and generic URL 'https://www.atlassian.com' with description 'Atlassian homepage'",
15
+ parameters: {
16
+ testCycleIdOrKey: "100001",
17
+ url: "https://www.atlassian.com",
18
+ description: "Atlassian homepage"
19
+ },
20
+ expectedOutput: "The newly created Web Link with its ID and self link"
21
+ },
22
+ {
23
+ description: "Create a web link for test cycle 'SA-R15' pointing to url: 'https://atlassian.com' with description 'Atlassian homepage'",
24
+ parameters: {
25
+ testCycleIdOrKey: "SA-R15",
26
+ url: "https://atlassian.com",
27
+ description: "Documentation for pump specifications"
28
+ },
29
+ expectedOutput: "The newly created Web Link with its ID and self link"
30
+ },
31
+ {
32
+ description: "Attach a documentation link 'https://docs.atlassian.com' to test cycle MM2-R15 for pump specifications",
33
+ parameters: {
34
+ testCycleIdOrKey: "10001",
35
+ url: "https://docs.atlassian.com",
36
+ description: "Documentation for pump specifications"
37
+ },
38
+ expectedOutput: "The newly created Web Link with its ID and self link"
39
+ }
40
+ ]
41
+ };
42
+ handle = async (args) => {
43
+ const parsed = CreateTestCycleWebLinkParams.and(
44
+ CreateTestCycleWebLinkBody
45
+ ).parse(args);
46
+ const { testCycleIdOrKey, ...body } = parsed;
47
+ const response = await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/weblinks`, body);
48
+ return {
49
+ structuredContent: response,
50
+ content: []
51
+ };
52
+ };
53
+ }
54
+ export {
55
+ CreateTestCycleWebLink
56
+ };
@@ -0,0 +1,39 @@
1
+ import { Tool } from "../../../common/tools.js";
2
+ import { GetTestCycleLinks200Response, GetTestCycleLinksParams } from "../../common/rest-api-schemas.js";
3
+ class GetTestCycleLinks extends Tool {
4
+ specification = {
5
+ title: "Get Test Cycle Links",
6
+ summary: "Get all links (issues, web links, and test plans) associated with a test cycle in Zephyr",
7
+ readOnly: true,
8
+ idempotent: true,
9
+ inputSchema: GetTestCycleLinksParams,
10
+ outputSchema: GetTestCycleLinks200Response,
11
+ examples: [
12
+ {
13
+ description: "Get all links for test cycle with id 1",
14
+ parameters: {
15
+ testCycleIdOrKey: "1"
16
+ },
17
+ expectedOutput: "All links (issues, web links, test plans) for the test cycle"
18
+ },
19
+ {
20
+ description: "Get all links for test cycle with key 'SA-R40'",
21
+ parameters: {
22
+ testCycleIdOrKey: "SA-R40"
23
+ },
24
+ expectedOutput: "All links (issues, web links, test plans) for the test cycle with key SA-R40"
25
+ }
26
+ ]
27
+ };
28
+ handle = async (args) => {
29
+ const { testCycleIdOrKey } = GetTestCycleLinksParams.parse(args);
30
+ const response = await this.client.getApiClient().get(`/testcycles/${testCycleIdOrKey}/links`);
31
+ return {
32
+ structuredContent: response,
33
+ content: []
34
+ };
35
+ };
36
+ }
37
+ export {
38
+ GetTestCycleLinks
39
+ };