@smartbear/mcp 0.12.1 → 0.13.1
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/README.md +30 -6
- package/dist/bugsnag/client/api/CurrentUser.js +50 -26
- package/dist/bugsnag/client/api/Error.js +156 -93
- package/dist/bugsnag/client/api/Project.js +398 -276
- package/dist/bugsnag/client/api/api.js +4087 -3837
- package/dist/bugsnag/client/api/base.js +155 -173
- package/dist/bugsnag/client/api/configuration.js +28 -25
- package/dist/bugsnag/client/filters.js +11 -20
- package/dist/bugsnag/client.js +1398 -1281
- package/dist/bugsnag/input-schemas.js +39 -57
- package/dist/collaborator/client.js +335 -371
- package/dist/common/bugsnag.js +5 -3
- package/dist/common/cache.js +50 -57
- package/dist/common/client-registry.js +106 -119
- package/dist/common/info.js +7 -3
- package/dist/common/register-clients.js +0 -16
- package/dist/common/server.js +270 -228
- package/dist/common/tools.js +19 -0
- package/dist/common/transport-http.js +252 -343
- package/dist/common/transport-stdio.js +40 -37
- package/dist/common/zod-utils.js +20 -0
- package/dist/index.js +18 -23
- package/dist/package.json.js +11 -0
- package/dist/pactflow/client/ai.js +142 -169
- package/dist/pactflow/client/base.js +41 -51
- package/dist/pactflow/client/prompt-utils.js +93 -84
- package/dist/pactflow/client/prompts.js +95 -92
- package/dist/pactflow/client/tools.js +94 -83
- package/dist/pactflow/client/utils.js +60 -64
- package/dist/pactflow/client.js +399 -320
- package/dist/qmetry/client/api/client-api.js +43 -41
- package/dist/qmetry/client/api/error-handler.js +264 -310
- package/dist/qmetry/client/auto-resolve.js +78 -99
- package/dist/qmetry/client/automation.js +139 -162
- package/dist/qmetry/client/handlers.js +49 -46
- package/dist/qmetry/client/issues.js +133 -115
- package/dist/qmetry/client/project.js +153 -174
- package/dist/qmetry/client/requirement.js +82 -70
- package/dist/qmetry/client/testcase.js +240 -208
- package/dist/qmetry/client/testsuite.js +332 -293
- package/dist/qmetry/client/tools/automation-tools.js +291 -288
- package/dist/qmetry/client/tools/index.js +16 -13
- package/dist/qmetry/client/tools/issue-tools.js +534 -543
- package/dist/qmetry/client/tools/project-tools.js +635 -656
- package/dist/qmetry/client/tools/requirement-tools.js +525 -528
- package/dist/qmetry/client/tools/testcase-tools.js +773 -786
- package/dist/qmetry/client/tools/testsuite-tools.js +1069 -1083
- package/dist/qmetry/client/utils.js +8 -14
- package/dist/qmetry/client.js +111 -109
- package/dist/qmetry/config/constants.js +48 -44
- package/dist/qmetry/config/rest-endpoints.js +51 -48
- package/dist/qmetry/types/automation.js +7 -7
- package/dist/qmetry/types/common.js +763 -1049
- package/dist/qmetry/types/issues.js +26 -19
- package/dist/qmetry/types/project.js +32 -25
- package/dist/qmetry/types/requirements.js +26 -21
- package/dist/qmetry/types/testcase.js +55 -44
- package/dist/qmetry/types/testsuite.js +66 -52
- package/dist/reflect/client.js +284 -226
- package/dist/swagger/client/api.js +645 -662
- package/dist/swagger/client/configuration.js +31 -33
- package/dist/swagger/client/portal-types.js +204 -244
- package/dist/swagger/client/registry-types.js +62 -96
- package/dist/swagger/client/tools.js +148 -158
- package/dist/swagger/client/user-management-types.js +11 -22
- package/dist/swagger/client.js +143 -135
- package/dist/swagger/config-utils.js +10 -16
- package/dist/zephyr/client.js +43 -42
- package/dist/zephyr/common/api-client.js +35 -30
- package/dist/zephyr/common/auth-service.js +16 -13
- package/dist/zephyr/common/rest-api-schemas.js +3173 -5146
- package/dist/zephyr/tool/environment/get-environments.js +66 -66
- package/dist/zephyr/tool/priority/get-priorities.js +41 -41
- package/dist/zephyr/tool/project/get-project.js +37 -37
- package/dist/zephyr/tool/project/get-projects.js +46 -46
- package/dist/zephyr/tool/status/get-statuses.js +47 -47
- package/dist/zephyr/tool/test-case/get-test-case.js +37 -37
- package/dist/zephyr/tool/test-case/get-test-cases.js +62 -62
- package/dist/zephyr/tool/test-cycle/get-test-cycle.js +37 -37
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +70 -70
- package/dist/zephyr/tool/test-execution/get-test-execution.js +37 -37
- package/dist/zephyr/tool/test-execution/get-test-executions.js +43 -43
- package/package.json +5 -5
- package/dist/bugsnag/client/api/index.js +0 -6
- package/dist/common/types.js +0 -6
- package/dist/qmetry/client/tools/types.js +0 -1
- package/dist/swagger/client/index.js +0 -6
- package/dist/tests/unit/bugsnag/utils/factories.js +0 -86
- package/dist/zephyr/tool/zephyr-tool.js +0 -1
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
structuredContent: response,
|
|
65
|
-
content: [],
|
|
66
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { listEnvironmentsResponse, listEnvironmentsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetEnvironments extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Environments",
|
|
6
|
+
summary: "Get environments in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: listEnvironmentsQueryParams,
|
|
10
|
+
outputSchema: listEnvironmentsResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the first 20 Environments",
|
|
14
|
+
parameters: {
|
|
15
|
+
maxResults: 20,
|
|
16
|
+
startAt: 0
|
|
17
|
+
},
|
|
18
|
+
expectedOutput: "The first 20 Environments with their details from different projects"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
description: "Get the first 10 Environments from the project with projectKey TEST",
|
|
22
|
+
parameters: {
|
|
23
|
+
projectKey: "TEST",
|
|
24
|
+
maxResults: 10,
|
|
25
|
+
startAt: 0
|
|
26
|
+
},
|
|
27
|
+
expectedOutput: "The first 10 Environments with their details from project with projectKey TEST"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
description: "Get second 10 Environments from the project with projectKey TEST",
|
|
31
|
+
parameters: {
|
|
32
|
+
projectKey: "TEST",
|
|
33
|
+
maxResults: 10,
|
|
34
|
+
startAt: 10
|
|
35
|
+
},
|
|
36
|
+
expectedOutput: "The second 10 Environments with their details from project with projectKey TEST"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
description: "Get Environments starting from the 5th Environment from different projects",
|
|
40
|
+
parameters: {
|
|
41
|
+
startAt: 5,
|
|
42
|
+
maxResults: 10
|
|
43
|
+
},
|
|
44
|
+
expectedOutput: "Environments starting from the 5th one with their details from different projects"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
description: "Get 5 Environments starting from the 10th Environment from the project with projectKey PROJ",
|
|
48
|
+
parameters: {
|
|
49
|
+
startAt: 10,
|
|
50
|
+
maxResults: 5,
|
|
51
|
+
projectKey: "PROJ"
|
|
52
|
+
},
|
|
53
|
+
expectedOutput: "The five environments starting from the 10th Environment from the project PROJ with their details"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
handle = async (args) => {
|
|
58
|
+
const getEnvironmentsInput = listEnvironmentsQueryParams.parse(args);
|
|
59
|
+
const response = await this.client.getApiClient().get("/environments", getEnvironmentsInput);
|
|
60
|
+
return {
|
|
61
|
+
structuredContent: response,
|
|
62
|
+
content: []
|
|
67
63
|
};
|
|
64
|
+
};
|
|
68
65
|
}
|
|
66
|
+
export {
|
|
67
|
+
GetEnvironments
|
|
68
|
+
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
structuredContent: response,
|
|
40
|
-
content: [],
|
|
41
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { listPrioritiesResponse, listPrioritiesQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetPriorities extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get priorities",
|
|
6
|
+
summary: "Get Zephyr Test Case priorities with optional filters",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: listPrioritiesQueryParams,
|
|
10
|
+
outputSchema: listPrioritiesResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the first 10 priorities",
|
|
14
|
+
parameters: {
|
|
15
|
+
maxResults: 10,
|
|
16
|
+
startAt: 0
|
|
17
|
+
},
|
|
18
|
+
expectedOutput: "The first 10 priorities with their details"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
description: "Get priorities for a specific project",
|
|
22
|
+
parameters: { projectKey: "PROJ" },
|
|
23
|
+
expectedOutput: "The priorities for project PROJ"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
description: "Get all priorities",
|
|
27
|
+
parameters: {},
|
|
28
|
+
expectedOutput: "All priorities"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
handle = async (args) => {
|
|
33
|
+
const getPrioritiesInput = listPrioritiesQueryParams.parse(args);
|
|
34
|
+
const response = await this.client.getApiClient().get("/priorities", getPrioritiesInput);
|
|
35
|
+
return {
|
|
36
|
+
structuredContent: response,
|
|
37
|
+
content: []
|
|
42
38
|
};
|
|
39
|
+
};
|
|
43
40
|
}
|
|
41
|
+
export {
|
|
42
|
+
GetPriorities
|
|
43
|
+
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
structuredContent: response,
|
|
36
|
-
content: [],
|
|
37
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { getProjectResponse, getProjectParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetProject extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Project",
|
|
6
|
+
summary: "Get details of project specified by id or key in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: getProjectParams,
|
|
10
|
+
outputSchema: getProjectResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the project with id 1",
|
|
14
|
+
parameters: {
|
|
15
|
+
projectIdOrKey: "1"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The project with its details"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
description: "Get the project with key 'PROJ'",
|
|
21
|
+
parameters: {
|
|
22
|
+
projectIdOrKey: "PROJ"
|
|
23
|
+
},
|
|
24
|
+
expectedOutput: "The project with its details"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
handle = async (args) => {
|
|
29
|
+
const { projectIdOrKey } = getProjectParams.parse(args);
|
|
30
|
+
const response = await this.client.getApiClient().get(`/projects/${projectIdOrKey}`);
|
|
31
|
+
return {
|
|
32
|
+
structuredContent: response,
|
|
33
|
+
content: []
|
|
38
34
|
};
|
|
35
|
+
};
|
|
39
36
|
}
|
|
37
|
+
export {
|
|
38
|
+
GetProject
|
|
39
|
+
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
structuredContent: response,
|
|
45
|
-
content: [],
|
|
46
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { listProjectsResponse, listProjectsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetProjects extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Projects",
|
|
6
|
+
summary: "Get details of projects in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: listProjectsQueryParams,
|
|
10
|
+
outputSchema: listProjectsResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the first 10 projects",
|
|
14
|
+
parameters: {
|
|
15
|
+
maxResults: 10,
|
|
16
|
+
startAt: 0
|
|
17
|
+
},
|
|
18
|
+
expectedOutput: "The first 10 projects with their details"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
description: "Get any project",
|
|
22
|
+
parameters: {
|
|
23
|
+
maxResults: 1
|
|
24
|
+
},
|
|
25
|
+
expectedOutput: "One project with its details"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
description: "Get five projects starting from the 7th project of the list",
|
|
29
|
+
parameters: {
|
|
30
|
+
maxResults: 5,
|
|
31
|
+
startAt: 6
|
|
32
|
+
},
|
|
33
|
+
expectedOutput: "The 7th to the 11th projects with their details"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
handle = async (args) => {
|
|
38
|
+
const parsedArgs = listProjectsQueryParams.parse(args);
|
|
39
|
+
const response = await this.client.getApiClient().get("/projects", parsedArgs);
|
|
40
|
+
return {
|
|
41
|
+
structuredContent: response,
|
|
42
|
+
content: []
|
|
47
43
|
};
|
|
44
|
+
};
|
|
48
45
|
}
|
|
46
|
+
export {
|
|
47
|
+
GetProjects
|
|
48
|
+
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
structuredContent: response,
|
|
46
|
-
content: [],
|
|
47
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { listStatusesResponse, listStatusesQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetStatuses extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Statuses",
|
|
6
|
+
summary: "Get statuses of different types of test artifacts in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: listStatusesQueryParams,
|
|
10
|
+
outputSchema: listStatusesResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the first 10 statuses",
|
|
14
|
+
parameters: {
|
|
15
|
+
maxResults: 10,
|
|
16
|
+
startAt: 0
|
|
17
|
+
},
|
|
18
|
+
expectedOutput: "The first 10 statuses with their details from different projects and test artifact types"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
description: "Get 10 test case statuses",
|
|
22
|
+
parameters: {
|
|
23
|
+
maxResults: 10,
|
|
24
|
+
statusType: "TEST_CASE"
|
|
25
|
+
},
|
|
26
|
+
expectedOutput: "A list of statuses related to test cases with their details"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
description: "Get five statuses from the project PROJ",
|
|
30
|
+
parameters: {
|
|
31
|
+
maxResults: 5,
|
|
32
|
+
projectKey: "PROJ"
|
|
33
|
+
},
|
|
34
|
+
expectedOutput: "The first five statuses from the project PROJ with their details"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
};
|
|
38
|
+
handle = async (args) => {
|
|
39
|
+
const getStatusesInput = listStatusesQueryParams.parse(args);
|
|
40
|
+
const response = await this.client.getApiClient().get("/statuses", getStatusesInput);
|
|
41
|
+
return {
|
|
42
|
+
structuredContent: response,
|
|
43
|
+
content: []
|
|
48
44
|
};
|
|
45
|
+
};
|
|
49
46
|
}
|
|
47
|
+
export {
|
|
48
|
+
GetStatuses
|
|
49
|
+
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
structuredContent: response,
|
|
36
|
-
content: [],
|
|
37
|
-
};
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { getTestCaseResponse, getTestCaseParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCase extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Case",
|
|
6
|
+
summary: "Get details of test case specified by key in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: getTestCaseParams,
|
|
10
|
+
outputSchema: getTestCaseResponse,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the test case with key 'SA-T10'",
|
|
14
|
+
parameters: {
|
|
15
|
+
testCaseKey: "SA-T10"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The test case with its details"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
description: "Get the test case with key 'MM2-T1'",
|
|
21
|
+
parameters: {
|
|
22
|
+
testCaseKey: "MM2-T1"
|
|
23
|
+
},
|
|
24
|
+
expectedOutput: "The test case with its details"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
handle = async (args) => {
|
|
29
|
+
const { testCaseKey } = getTestCaseParams.parse(args);
|
|
30
|
+
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}`);
|
|
31
|
+
return {
|
|
32
|
+
structuredContent: response,
|
|
33
|
+
content: []
|
|
38
34
|
};
|
|
35
|
+
};
|
|
39
36
|
}
|
|
37
|
+
export {
|
|
38
|
+
GetTestCase
|
|
39
|
+
};
|