@smartbear/mcp 0.15.0 → 0.17.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.
- package/dist/bugsnag/client/api/Error.js +43 -0
- package/dist/bugsnag/client.js +44 -1310
- package/dist/bugsnag/input-schemas.js +18 -18
- package/dist/bugsnag/tool/error/get-error.js +98 -0
- package/dist/bugsnag/tool/error/list-project-errors.js +102 -0
- package/dist/bugsnag/tool/error/update-error.js +256 -0
- package/dist/bugsnag/tool/event/get-event-details-from-dashboard-url.js +55 -0
- package/dist/bugsnag/tool/event/get-event.js +38 -0
- package/dist/bugsnag/tool/event/list-error-events.js +62 -0
- package/dist/bugsnag/tool/performance/get-network-endpoint-groupings.js +46 -0
- package/dist/bugsnag/tool/performance/get-span-group.js +73 -0
- package/dist/bugsnag/tool/performance/get-trace.js +83 -0
- package/dist/bugsnag/tool/performance/list-span-groups.js +111 -0
- package/dist/bugsnag/tool/performance/list-spans.js +97 -0
- package/dist/bugsnag/tool/performance/list-trace-fields.js +41 -0
- package/dist/bugsnag/tool/performance/set-network-endpoint-groupings.js +90 -0
- package/dist/bugsnag/tool/project/get-current-project.js +31 -0
- package/dist/bugsnag/tool/project/list-project-event-filters.js +42 -0
- package/dist/bugsnag/tool/project/list-projects.js +43 -0
- package/dist/bugsnag/tool/release/get-build.js +50 -0
- package/dist/bugsnag/tool/release/get-release.js +68 -0
- package/dist/bugsnag/tool/release/list-releases.js +88 -0
- package/dist/common/prompts.js +9 -0
- package/dist/common/server.js +16 -0
- package/dist/common/transport-http.js +2 -0
- package/dist/package.json.js +1 -1
- package/dist/reflect/client.js +66 -1
- package/dist/reflect/config/constants.js +3 -1
- package/dist/reflect/prompt/sap-test.js +29 -0
- package/dist/reflect/tool/recording/add-prompt-step.js +60 -0
- package/dist/reflect/tool/recording/add-segment.js +56 -0
- package/dist/reflect/tool/recording/connect-to-session.js +89 -0
- package/dist/reflect/tool/recording/delete-previous-step.js +47 -0
- package/dist/reflect/tool/recording/get-screenshot.js +55 -0
- package/dist/reflect/tool/tests/list-segments.js +68 -0
- package/dist/reflect/websocket-manager.js +92 -0
- package/dist/zephyr/client.js +2 -0
- package/dist/zephyr/common/rest-api-schemas.js +173 -312
- package/dist/zephyr/tool/issue-link/get-test-executions.js +1 -1
- package/dist/zephyr/tool/test-case/create-issue-link.js +4 -2
- package/dist/zephyr/tool/test-case/create-test-script.js +4 -2
- package/dist/zephyr/tool/test-case/create-test-steps.js +4 -2
- package/dist/zephyr/tool/test-case/create-web-link.js +5 -2
- package/dist/zephyr/tool/test-case/get-test-steps.js +4 -2
- package/dist/zephyr/tool/test-case/update-test-case.js +2 -0
- package/dist/zephyr/tool/test-cycle/create-issue-link.js +4 -2
- package/dist/zephyr/tool/test-cycle/create-web-link.js +4 -2
- package/dist/zephyr/tool/test-cycle/update-test-cycle.js +1 -0
- package/dist/zephyr/tool/test-execution/create-issue-link.js +4 -2
- package/dist/zephyr/tool/test-execution/get-test-steps.js +4 -2
- package/dist/zephyr/tool/test-execution/update-test-execution.js +5 -2
- package/dist/zephyr/tool/test-execution/update-test-steps.js +89 -0
- package/package.json +11 -9
|
@@ -20,7 +20,7 @@ class GetTestExecutions extends Tool {
|
|
|
20
20
|
};
|
|
21
21
|
handle = async (args) => {
|
|
22
22
|
const { issueKey } = GetIssueLinkTestExecutionsParams.parse(args);
|
|
23
|
-
const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/
|
|
23
|
+
const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/executions`);
|
|
24
24
|
return {
|
|
25
25
|
structuredContent: { testExecutions: response },
|
|
26
26
|
content: []
|
|
@@ -22,8 +22,10 @@ class CreateTestCaseIssueLink extends Tool {
|
|
|
22
22
|
]
|
|
23
23
|
};
|
|
24
24
|
handle = async (args) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const parsed = CreateTestCaseIssueLinkParams.and(
|
|
26
|
+
CreateTestCaseIssueLinkBody
|
|
27
|
+
).parse(args);
|
|
28
|
+
const { testCaseKey, ...body } = parsed;
|
|
27
29
|
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/links/issues`, body);
|
|
28
30
|
return {
|
|
29
31
|
structuredContent: response,
|
|
@@ -41,8 +41,10 @@ class CreateTestScript extends Tool {
|
|
|
41
41
|
]
|
|
42
42
|
};
|
|
43
43
|
handle = async (args) => {
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const parsed = CreateTestCaseTestScriptParams.and(
|
|
45
|
+
CreateTestCaseTestScriptBody
|
|
46
|
+
).parse(args);
|
|
47
|
+
const { testCaseKey, ...body } = parsed;
|
|
46
48
|
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/testscript`, body);
|
|
47
49
|
return {
|
|
48
50
|
structuredContent: response,
|
|
@@ -75,8 +75,10 @@ class CreateTestSteps extends Tool {
|
|
|
75
75
|
]
|
|
76
76
|
};
|
|
77
77
|
handle = async (args) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
78
|
+
const parsed = CreateTestCaseTestStepsParams.and(
|
|
79
|
+
CreateTestCaseTestStepsBody
|
|
80
|
+
).parse(args);
|
|
81
|
+
const { testCaseKey, ...body } = parsed;
|
|
80
82
|
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/teststeps`, body);
|
|
81
83
|
return {
|
|
82
84
|
structuredContent: response,
|
|
@@ -32,8 +32,11 @@ class CreateTestCaseWebLink extends Tool {
|
|
|
32
32
|
]
|
|
33
33
|
};
|
|
34
34
|
handle = async (args) => {
|
|
35
|
-
const
|
|
36
|
-
|
|
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,
|
|
@@ -40,8 +40,10 @@ class GetTestCaseSteps extends Tool {
|
|
|
40
40
|
]
|
|
41
41
|
};
|
|
42
42
|
handle = async (args) => {
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const parsed = GetTestCaseTestStepsParams.and(
|
|
44
|
+
GetTestCaseTestStepsQueryParams
|
|
45
|
+
).parse(args);
|
|
46
|
+
const { testCaseKey, ...parsedArgs } = parsed;
|
|
45
47
|
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/teststeps`, parsedArgs);
|
|
46
48
|
return {
|
|
47
49
|
structuredContent: response,
|
|
@@ -67,6 +67,8 @@ class UpdateTestCase extends Tool {
|
|
|
67
67
|
const { testCaseKey, ...updates } = parsed;
|
|
68
68
|
const existingTestCase = await this.client.getApiClient().get(`/testcases/${testCaseKey}`);
|
|
69
69
|
const mergedBody = deepMerge(existingTestCase, updates);
|
|
70
|
+
delete mergedBody.createdOn;
|
|
71
|
+
delete mergedBody.links;
|
|
70
72
|
await this.client.getApiClient().put(`/testcases/${testCaseKey}`, mergedBody);
|
|
71
73
|
return {
|
|
72
74
|
structuredContent: {},
|
|
@@ -29,8 +29,10 @@ class CreateTestCycleIssueLink extends Tool {
|
|
|
29
29
|
]
|
|
30
30
|
};
|
|
31
31
|
handle = async (args) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const parsed = CreateTestCycleIssueLinkParams.and(
|
|
33
|
+
CreateTestCycleIssueLinkBody
|
|
34
|
+
).parse(args);
|
|
35
|
+
const { testCycleIdOrKey, ...body } = parsed;
|
|
34
36
|
await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/issues`, body);
|
|
35
37
|
return {
|
|
36
38
|
structuredContent: {},
|
|
@@ -40,8 +40,10 @@ class CreateTestCycleWebLink extends Tool {
|
|
|
40
40
|
]
|
|
41
41
|
};
|
|
42
42
|
handle = async (args) => {
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const parsed = CreateTestCycleWebLinkParams.and(
|
|
44
|
+
CreateTestCycleWebLinkBody
|
|
45
|
+
).parse(args);
|
|
46
|
+
const { testCycleIdOrKey, ...body } = parsed;
|
|
45
47
|
const response = await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/weblinks`, body);
|
|
46
48
|
return {
|
|
47
49
|
structuredContent: response,
|
|
@@ -78,6 +78,7 @@ class UpdateTestCycle extends Tool {
|
|
|
78
78
|
if (updates.plannedEndDate === null) delete updates.plannedEndDate;
|
|
79
79
|
const existingTestCycle = await this.client.getApiClient().get(`/testcycles/${testCycleIdOrKey}`);
|
|
80
80
|
const mergedBody = deepMerge(existingTestCycle, updates);
|
|
81
|
+
delete mergedBody.links;
|
|
81
82
|
await this.client.getApiClient().put(`/testcycles/${testCycleIdOrKey}`, mergedBody);
|
|
82
83
|
return {
|
|
83
84
|
structuredContent: {},
|
|
@@ -29,8 +29,10 @@ class CreateTestExecutionIssueLink extends Tool {
|
|
|
29
29
|
]
|
|
30
30
|
};
|
|
31
31
|
handle = async (args) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const parsed = CreateTestExecutionIssueLinkParams.and(
|
|
33
|
+
CreateTestExecutionIssueLinkBody
|
|
34
|
+
).parse(args);
|
|
35
|
+
const { testExecutionIdOrKey, ...body } = parsed;
|
|
34
36
|
await this.client.getApiClient().post(`/testexecutions/${testExecutionIdOrKey}/links/issues`, body);
|
|
35
37
|
return {
|
|
36
38
|
structuredContent: {},
|
|
@@ -59,8 +59,10 @@ class GetTestExecutionSteps extends Tool {
|
|
|
59
59
|
]
|
|
60
60
|
};
|
|
61
61
|
handle = async (args) => {
|
|
62
|
-
const
|
|
63
|
-
|
|
62
|
+
const parsed = GetTestExecutionTestStepsParams.and(
|
|
63
|
+
GetTestExecutionTestStepsQueryParams
|
|
64
|
+
).parse(args);
|
|
65
|
+
const { testExecutionIdOrKey, ...parsedArgs } = parsed;
|
|
64
66
|
const response = await this.client.getApiClient().get(`/testexecutions/${testExecutionIdOrKey}/teststeps`, parsedArgs);
|
|
65
67
|
return {
|
|
66
68
|
structuredContent: response,
|
|
@@ -56,8 +56,11 @@ class UpdateTestExecution extends Tool {
|
|
|
56
56
|
]
|
|
57
57
|
};
|
|
58
58
|
handle = async (args) => {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const fullInputSchema = UpdateTestExecutionParams.and(
|
|
60
|
+
UpdateTestExecutionBody.partial()
|
|
61
|
+
);
|
|
62
|
+
const parsed = fullInputSchema.parse(args);
|
|
63
|
+
const { testExecutionIdOrKey, ...body } = parsed;
|
|
61
64
|
await this.client.getApiClient().put(`/testexecutions/${testExecutionIdOrKey}`, body);
|
|
62
65
|
return {
|
|
63
66
|
structuredContent: {},
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { PutTestExecutionTestStepsParams, PutTestExecutionTestStepsBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class UpdateTestExecutionSteps extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Update Test Execution Steps",
|
|
6
|
+
summary: "Update test steps for a given Test Execution in Zephyr. This operation updates the provided steps with their execution status and actual results. Only the fields included in the request will be modified.",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: PutTestExecutionTestStepsParams.and(
|
|
10
|
+
PutTestExecutionTestStepsBody
|
|
11
|
+
),
|
|
12
|
+
examples: [
|
|
13
|
+
{
|
|
14
|
+
description: "Mark the status of all steps in the test execution 'SA-E1' as 'Pass'. Set the actual result of step 1 to 'Dashboard widgets loaded correctly' and step 2 to 'Navigation menu responded correctly to user interactions'.",
|
|
15
|
+
parameters: {
|
|
16
|
+
testExecutionIdOrKey: "SA-E1",
|
|
17
|
+
steps: [
|
|
18
|
+
{
|
|
19
|
+
statusName: "Pass",
|
|
20
|
+
actualResult: "Dashboard widgets loaded correctly"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
statusName: "Pass",
|
|
24
|
+
actualResult: "Navigation menu responded correctly to user interactions"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
expectedOutput: "Test steps are updated successfully, but no output is expected."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
description: "Update only the status of step 2 in test execution 'SA-E5' to 'Fail'. Do not modify any other fields.",
|
|
32
|
+
parameters: {
|
|
33
|
+
testExecutionIdOrKey: "SA-E5",
|
|
34
|
+
steps: [
|
|
35
|
+
{},
|
|
36
|
+
{
|
|
37
|
+
statusName: "Fail"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
expectedOutput: "The test execution steps are updated, but no output is expected."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
description: "Update only the actual results of the steps in test execution '10'. Set the actual result of step 1 to 'API returned 500 error' and step 2 actual result to 'API returned 200 success'",
|
|
45
|
+
parameters: {
|
|
46
|
+
testExecutionIdOrKey: "10",
|
|
47
|
+
steps: [
|
|
48
|
+
{
|
|
49
|
+
actualResult: "API returned 500 error"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
actualResult: "API returned 200 success"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
expectedOutput: "Test steps are updated successfully, but no output is expected."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
};
|
|
60
|
+
handle = async (args) => {
|
|
61
|
+
const parsed = PutTestExecutionTestStepsParams.and(
|
|
62
|
+
PutTestExecutionTestStepsBody.required()
|
|
63
|
+
).parse(args);
|
|
64
|
+
const { testExecutionIdOrKey, steps: stepUpdates } = parsed;
|
|
65
|
+
const response = await this.client.getApiClient().get(`/testexecutions/${testExecutionIdOrKey}/teststeps`);
|
|
66
|
+
const existingSteps = response.values;
|
|
67
|
+
const updatedSteps = existingSteps.map(
|
|
68
|
+
(existingStep, index) => {
|
|
69
|
+
const update = stepUpdates?.[index];
|
|
70
|
+
return {
|
|
71
|
+
actualResult: update?.actualResult ?? existingStep.inline.actualResult,
|
|
72
|
+
...update?.statusName !== void 0 && {
|
|
73
|
+
statusName: update.statusName
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
await this.client.getApiClient().put(`/testexecutions/${testExecutionIdOrKey}/teststeps`, {
|
|
79
|
+
steps: updatedSteps
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
structuredContent: {},
|
|
83
|
+
content: []
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
UpdateTestExecutionSteps
|
|
89
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartbear/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "MCP server for interacting SmartBear Products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"smartbear",
|
|
@@ -47,21 +47,23 @@
|
|
|
47
47
|
"bump": "node scripts/bump.js"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@bugsnag/js": "^8.
|
|
51
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
50
|
+
"@bugsnag/js": "^8.8.1",
|
|
51
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
52
52
|
"node-cache": "^5.1.2",
|
|
53
|
-
"swagger-client": "^3.
|
|
53
|
+
"swagger-client": "^3.37.1",
|
|
54
54
|
"vite": "^7.3.1",
|
|
55
|
-
"
|
|
55
|
+
"ws": "^8.19.0",
|
|
56
|
+
"zod": "^4.3.6"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@biomejs/biome": "^2.
|
|
59
|
+
"@biomejs/biome": "^2.4.8",
|
|
59
60
|
"@types/js-yaml": "^4.0.9",
|
|
60
|
-
"@types/node": "^22",
|
|
61
|
+
"@types/node": "^22.19.15",
|
|
62
|
+
"@types/ws": "^8.18.1",
|
|
61
63
|
"@vitest/coverage-v8": "^3.2.4",
|
|
62
|
-
"globals": "^16.
|
|
64
|
+
"globals": "^16.5.0",
|
|
63
65
|
"shx": "^0.3.4",
|
|
64
|
-
"typescript": "^5.
|
|
66
|
+
"typescript": "^5.9.3",
|
|
65
67
|
"vitest": "^3.2.4",
|
|
66
68
|
"vitest-fetch-mock": "^0.4.5"
|
|
67
69
|
}
|