@smartbear/mcp 0.8.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 (66) hide show
  1. package/README.md +29 -4
  2. package/dist/api-hub/client/api.js +239 -10
  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/registry-types.js +8 -0
  7. package/dist/api-hub/client/tools.js +78 -15
  8. package/dist/api-hub/client/user-management-types.js +24 -0
  9. package/dist/api-hub/client.js +34 -0
  10. package/dist/bugsnag/client/api/CurrentUser.js +12 -49
  11. package/dist/bugsnag/client/api/Error.js +29 -142
  12. package/dist/bugsnag/client/api/Project.js +52 -113
  13. package/dist/bugsnag/client/api/api.js +3743 -0
  14. package/dist/bugsnag/client/api/base.js +97 -34
  15. package/dist/bugsnag/client/api/configuration.js +26 -0
  16. package/dist/bugsnag/client/api/index.js +2 -0
  17. package/dist/bugsnag/client/filters.js +28 -0
  18. package/dist/bugsnag/client.js +104 -155
  19. package/dist/collaborator/client.js +364 -0
  20. package/dist/common/server.js +73 -23
  21. package/dist/common/types.js +6 -1
  22. package/dist/index.js +9 -1
  23. package/dist/pactflow/client/prompt-utils.js +2 -1
  24. package/dist/pactflow/client/tools.js +4 -4
  25. package/dist/pactflow/client/utils.js +5 -4
  26. package/dist/pactflow/client.js +10 -9
  27. package/dist/qmetry/client/api/client-api.js +21 -16
  28. package/dist/qmetry/client/api/error-handler.js +329 -0
  29. package/dist/qmetry/client/auto-resolve.js +96 -0
  30. package/dist/qmetry/client/handlers.js +33 -2
  31. package/dist/qmetry/client/issues.js +123 -0
  32. package/dist/qmetry/client/project.js +73 -0
  33. package/dist/qmetry/client/requirement.js +76 -0
  34. package/dist/qmetry/client/testcase.js +122 -6
  35. package/dist/qmetry/client/testsuite.js +272 -0
  36. package/dist/qmetry/client/tools/index.js +17 -0
  37. package/dist/qmetry/client/tools/issue-tools.js +545 -0
  38. package/dist/qmetry/client/tools/project-tools.js +348 -0
  39. package/dist/qmetry/client/tools/requirement-tools.js +530 -0
  40. package/dist/qmetry/client/tools/testcase-tools.js +526 -0
  41. package/dist/qmetry/client/tools/testsuite-tools.js +772 -0
  42. package/dist/qmetry/client/tools/types.js +1 -0
  43. package/dist/qmetry/client/utils.js +16 -0
  44. package/dist/qmetry/client.js +27 -17
  45. package/dist/qmetry/config/constants.js +28 -0
  46. package/dist/qmetry/config/rest-endpoints.js +30 -0
  47. package/dist/qmetry/types/common.js +599 -9
  48. package/dist/qmetry/types/issues.js +16 -0
  49. package/dist/qmetry/types/project.js +17 -0
  50. package/dist/qmetry/types/requirements.js +19 -0
  51. package/dist/qmetry/types/testcase.js +20 -0
  52. package/dist/qmetry/types/testsuite.js +44 -0
  53. package/dist/reflect/client.js +7 -6
  54. package/dist/zephyr/client.js +7 -1
  55. package/dist/zephyr/common/api-client.js +8 -0
  56. package/dist/zephyr/common/auth-service.js +1 -0
  57. package/dist/zephyr/common/rest-api-schemas.js +5173 -0
  58. package/dist/zephyr/tool/project/get-project.js +39 -0
  59. package/dist/zephyr/tool/project/get-projects.js +7 -13
  60. package/dist/zephyr/tool/test-cycle/get-test-cycles.js +72 -0
  61. package/package.json +1 -1
  62. package/dist/bugsnag/client/api/filters.js +0 -167
  63. package/dist/bugsnag/client/configuration.js +0 -10
  64. package/dist/bugsnag/client/index.js +0 -2
  65. package/dist/qmetry/client/tools.js +0 -222
  66. package/dist/zephyr/common/types.js +0 -35
@@ -0,0 +1,348 @@
1
+ import { QMetryToolsHandlers } from "../../config/constants.js";
2
+ import { BuildArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ProjectListArgsSchema, ReleasesCyclesArgsSchema, } from "../../types/common.js";
3
+ export const PROJECT_TOOLS = [
4
+ {
5
+ title: "Fetch QMetry list Projects",
6
+ summary: "Fetch QMetry projects list including projectID, name, projectKey, isArchived, viewIds and folderPath needed for other operations",
7
+ handler: QMetryToolsHandlers.FETCH_PROJECTS,
8
+ inputSchema: ProjectListArgsSchema,
9
+ purpose: "Prerequisite tool that provides project list to user that associated to valid API Key. " +
10
+ "The project key to fetch info for. Use 'default' if not specified. " +
11
+ "Common project keys include 'UT', 'VT', 'MAC', etc. " +
12
+ "If user doesn't specify a project key, this tool will use 'default' automatically.",
13
+ useCases: [
14
+ "Get project list to check user how many project access to particular apikey",
15
+ "Retrieve available fields of each project list including projectID, name, projectKey, isArchived, viewIds and folderPath needed for other operations",
16
+ "Validate project access and permissions",
17
+ ],
18
+ examples: [
19
+ {
20
+ description: "Get list of project available to user",
21
+ parameters: {
22
+ params: {
23
+ showArchive: false,
24
+ },
25
+ },
26
+ expectedOutput: "Project active/non archived list including some important fields like projectID, name, projectKey, isArchived, viewIds and folderPath needed for other operations",
27
+ },
28
+ {
29
+ description: "Get projects with custom pagination",
30
+ parameters: {
31
+ params: {
32
+ showArchive: false,
33
+ },
34
+ page: 1,
35
+ limit: 10,
36
+ start: 0,
37
+ },
38
+ expectedOutput: "List of projects with custom pagination settings",
39
+ },
40
+ {
41
+ description: "Get not active/archived projects",
42
+ parameters: {
43
+ params: {
44
+ showArchive: true,
45
+ },
46
+ },
47
+ expectedOutput: "List of all projects including archived ones (showArchive: true sent in payload)",
48
+ },
49
+ {
50
+ description: "Filter projects by name",
51
+ parameters: {
52
+ filter: '[{"value":"MAC","type":"string","field":"name"}]',
53
+ },
54
+ expectedOutput: "Filtered list of projects matching the name criteria",
55
+ },
56
+ {
57
+ description: "Filter projects by project key",
58
+ parameters: {
59
+ filter: '[{"value":"MAC","type":"string","field":"projectKey"}]',
60
+ },
61
+ expectedOutput: "List of projects filtered by project key (e.g. 'MAC', 'UT', etc.)",
62
+ },
63
+ ],
64
+ hints: [
65
+ "Fetch list of projects available to user",
66
+ "Use 'default' project key when user doesn't specify one",
67
+ "Use params.showArchive: true/false to get archived/non-archived projects, default is false when not provided",
68
+ "Pagination supported for large result sets (start, page, limit parameters)",
69
+ "Filter parameter should be a JSON string with filter criteria",
70
+ "Common filter fields: 'name' (string), 'projectKey' (string)",
71
+ ],
72
+ outputDescription: "JSON object containing list of projects details",
73
+ readOnly: true,
74
+ idempotent: true,
75
+ },
76
+ {
77
+ title: "Set QMetry Project Info",
78
+ summary: "Set current QMetry project for your account",
79
+ handler: QMetryToolsHandlers.SET_PROJECT_INFO,
80
+ inputSchema: ProjectArgsSchema,
81
+ purpose: "Switch the active QMetry project context for the current session. " +
82
+ "This tool sets the default project that will be used for all subsequent QMetry operations. " +
83
+ "Essential for multi-project QMetry instances where you need to work with specific projects.",
84
+ useCases: [
85
+ "Switch to a specific project before performing test case operations",
86
+ "Set project context for batch operations on test cases",
87
+ "Configure the default project for the current session",
88
+ "Validate access to a specific project before proceeding with operations",
89
+ ],
90
+ examples: [
91
+ {
92
+ description: "Set default project as active",
93
+ parameters: { projectKey: "default" },
94
+ expectedOutput: "Project context set to 'default' with confirmation of project details",
95
+ },
96
+ {
97
+ description: "Switch to UT project",
98
+ parameters: { projectKey: "UT" },
99
+ expectedOutput: "Project context switched to 'UT' project with available configurations",
100
+ },
101
+ {
102
+ description: "Set MAC project as active for test case operations",
103
+ parameters: { projectKey: "MAC" },
104
+ expectedOutput: "Project context set to 'MAC' with viewIds and folder structure",
105
+ },
106
+ ],
107
+ hints: [
108
+ "Always set the project context before performing test case operations in multi-project environments",
109
+ "Use the same project key that you'll use in subsequent test case operations",
110
+ "Common project keys include 'default', 'UT', 'MAC', 'VT' - check with your QMetry admin for available projects",
111
+ "This operation must be performed before fetching test cases if working with non-default projects",
112
+ "The project context persists for the current session until changed again",
113
+ ],
114
+ outputDescription: "JSON object containing project configuration details, confirmation of project switch, and available project metadata",
115
+ readOnly: false,
116
+ idempotent: true,
117
+ },
118
+ {
119
+ title: "Fetch QMetry Project Info",
120
+ summary: "Fetch QMetry project information including viewId and folderPath needed for other operations",
121
+ handler: QMetryToolsHandlers.FETCH_PROJECT_INFO,
122
+ inputSchema: ProjectArgsSchema,
123
+ purpose: "Prerequisite tool that provides project configuration data required by other QMetry operations. " +
124
+ "The project key to fetch info for. Use 'default' if not specified. " +
125
+ "Common project keys include 'UT', 'VT', 'MAC', etc. " +
126
+ "If user doesn't specify a project key, this tool will use 'default' automatically.",
127
+ useCases: [
128
+ "Get project configuration before fetching test cases",
129
+ "Retrieve available viewIds for test case listing",
130
+ "Get folderPath information for project navigation",
131
+ "Validate project access and permissions",
132
+ ],
133
+ examples: [
134
+ {
135
+ description: "Get default project info",
136
+ parameters: {},
137
+ expectedOutput: "Project configuration with viewIds, folderPaths, and project details",
138
+ },
139
+ {
140
+ description: "Get specific project info",
141
+ parameters: { projectKey: "MAC" },
142
+ expectedOutput: "MAC project configuration with available views and folders",
143
+ },
144
+ ],
145
+ hints: [
146
+ "Always call this first when user doesn't provide viewId or folderPath",
147
+ "Use 'default' project key when user doesn't specify one",
148
+ "Extract viewId from latestViews.TC.viewId for test case operations",
149
+ "Use empty string '' as folderPath for root directory",
150
+ ],
151
+ outputDescription: "JSON object containing project details, viewIds, folderPaths, and project configuration",
152
+ readOnly: true,
153
+ idempotent: true,
154
+ },
155
+ {
156
+ title: "Fetch Releases and Cycles",
157
+ summary: "Fetch QMetry releases and cycles from the current project",
158
+ handler: QMetryToolsHandlers.FETCH_RELEASES_CYCLES,
159
+ inputSchema: ReleasesCyclesArgsSchema,
160
+ purpose: "Retrieve release and cycle information from the current QMetry project. " +
161
+ "Releases represent major versions or milestones, while cycles represent test execution phases within releases. " +
162
+ "This tool provides the hierarchical structure of releases and their associated cycles.",
163
+ useCases: [
164
+ "Fetch associated releases and cycles of current project",
165
+ "Fetch available releases and cycles of current project",
166
+ "Get release and cycle information for test planning",
167
+ "List all releases and cycles in a project",
168
+ "Search for specific releases using release name or ID",
169
+ "Fetch cycle lists based on release ID",
170
+ "Search for specific cycles using cycle name or ID",
171
+ "Get project structure for test planning and execution",
172
+ "Retrieve release hierarchy for reporting purposes",
173
+ ],
174
+ examples: [
175
+ {
176
+ description: "Get active releases and cycles (default behavior)",
177
+ parameters: {},
178
+ expectedOutput: "List of active releases and cycles excluding archived ones (showArchive: false sent in payload)",
179
+ },
180
+ {
181
+ description: "Get active/unarchived releases and cycles explicitly",
182
+ parameters: { showArchive: false },
183
+ expectedOutput: "List of active releases and cycles excluding archived ones (showArchive: false sent in payload)",
184
+ },
185
+ {
186
+ description: "Get not active/archived releases and cycles",
187
+ parameters: { showArchive: true },
188
+ expectedOutput: "List of all releases and cycles including archived ones (showArchive: true sent in payload)",
189
+ },
190
+ ],
191
+ hints: [
192
+ "Use 'default' project key when user doesn't specify one",
193
+ "PAYLOAD SCENARIOS:",
194
+ "- No showArchive parameter → payload: {showArchive: false} → Returns only active releases/cycles",
195
+ "- showArchive: false → payload: {showArchive: false} → Returns only active/non-archived releases/cycles",
196
+ "- showArchive: true → payload: {showArchive: true} → Returns all releases/cycles including archived ones",
197
+ "Default behavior always excludes archived items unless explicitly requested",
198
+ "Releases contain cycles - use this hierarchy for test execution planning",
199
+ "Each release can have multiple cycles representing different testing phases",
200
+ ],
201
+ outputDescription: "JSON object with project hierarchy containing releases and their associated cycles",
202
+ readOnly: true,
203
+ idempotent: true,
204
+ openWorld: false,
205
+ },
206
+ {
207
+ title: "Fetch Builds",
208
+ summary: "Fetch QMetry builds from the current project",
209
+ handler: QMetryToolsHandlers.FETCH_BUILDS,
210
+ inputSchema: BuildArgsSchema,
211
+ purpose: "Retrieve builds information from the current QMetry project. " +
212
+ "Builds represent specific versions or iterations of software that can be associated with test executions. " +
213
+ "This tool provides a list of builds with their metadata for test planning and execution tracking.",
214
+ useCases: [
215
+ "Fetch all from the current project",
216
+ "Fetch all available builds for test execution planning",
217
+ "Get build metadata for test run assignments",
218
+ "List builds for reporting and analytics",
219
+ "Filter builds by name or archive status",
220
+ "Get paginated build results for large projects",
221
+ "Retrieve build information for CI/CD integration",
222
+ "Search for specific builds using filters",
223
+ "Get build details for test execution history",
224
+ ],
225
+ examples: [
226
+ {
227
+ description: "Get all builds (default behavior)",
228
+ parameters: {},
229
+ expectedOutput: "List of all builds with default pagination (10 items per page)",
230
+ },
231
+ {
232
+ description: "Get builds with custom pagination",
233
+ parameters: { page: 1, limit: 10, start: 0 },
234
+ expectedOutput: "List of builds with custom pagination settings",
235
+ },
236
+ {
237
+ description: "Filter builds by name",
238
+ parameters: {
239
+ filter: '[{"value":"Build 1.0","type":"string","field":"name"}]',
240
+ },
241
+ expectedOutput: "Filtered list of builds matching the name criteria",
242
+ },
243
+ {
244
+ description: "Filter builds by archive status",
245
+ parameters: {
246
+ filter: '[{"value":[1,0],"type":"list","field":"isArchived"}]',
247
+ },
248
+ expectedOutput: "List of builds filtered by archive status (archived and non-archived)",
249
+ },
250
+ ],
251
+ hints: [
252
+ "Use 'default' project key when user doesn't specify one",
253
+ "Default pagination: start=0, page=1, limit=10",
254
+ "Filter parameter should be a JSON string with filter criteria",
255
+ "Common filter fields: 'name' (string), 'isArchived' (list of 0,1)",
256
+ "Empty payload {} is sent when no parameters are provided",
257
+ "Builds are also known as 'drops' in QMetry terminology",
258
+ "Use builds for associating test executions with specific software versions",
259
+ ],
260
+ outputDescription: "JSON object with builds list and pagination metadata",
261
+ readOnly: true,
262
+ idempotent: true,
263
+ openWorld: false,
264
+ },
265
+ {
266
+ title: "Fetch Platforms",
267
+ summary: "Fetch QMetry platforms from the current project",
268
+ handler: QMetryToolsHandlers.FETCH_PLATFORMS,
269
+ inputSchema: PlatformArgsSchema,
270
+ purpose: "Retrieve platforms information from the current QMetry project. " +
271
+ "Platforms represent testing environments, operating systems, browsers, or devices " +
272
+ "that can be associated with test case execution and reporting. " +
273
+ "This tool provides a list of platforms with their metadata for test planning and execution tracking.",
274
+ useCases: [
275
+ "Fetch all platforms from the current project",
276
+ "Get platform metadata for test execution planning",
277
+ "List platforms for test environment selection",
278
+ "Filter platforms by name or properties",
279
+ "Get paginated platform results for large projects",
280
+ "Retrieve platform information for cross-platform testing",
281
+ "Search for specific platforms using filters",
282
+ "Get platform details for test execution assignment",
283
+ ],
284
+ examples: [
285
+ {
286
+ description: "Get all platforms (default behavior)",
287
+ parameters: {},
288
+ expectedOutput: "List of all platforms with default pagination (10 items per page)",
289
+ },
290
+ {
291
+ description: "Get platforms with custom pagination",
292
+ parameters: { page: 1, limit: 10, start: 0 },
293
+ expectedOutput: "List of platforms with custom pagination settings",
294
+ },
295
+ {
296
+ description: "Filter platforms by name",
297
+ parameters: {
298
+ filter: '[{"value":"Chrome","type":"string","field":"name"}]',
299
+ },
300
+ expectedOutput: "Filtered list of platforms matching the name criteria",
301
+ },
302
+ {
303
+ description: "Filter platforms by archive status",
304
+ parameters: {
305
+ filter: '[{"value":[1,0],"type":"list","field":"isArchived"}]',
306
+ },
307
+ expectedOutput: "List of platforms filtered by archive status (archived and non-archived)",
308
+ },
309
+ {
310
+ description: "Get only archived platforms",
311
+ parameters: {
312
+ filter: '[{"value":[1],"type":"list","field":"isArchived"}]',
313
+ },
314
+ expectedOutput: "List of only archived platforms",
315
+ },
316
+ {
317
+ description: "Get only active/non-archived platforms",
318
+ parameters: {
319
+ filter: '[{"value":[0],"type":"list","field":"isArchived"}]',
320
+ },
321
+ expectedOutput: "List of only active/non-archived platforms",
322
+ },
323
+ {
324
+ description: "Get platforms with custom sorting",
325
+ parameters: {
326
+ sort: '[{"property":"name","direction":"ASC"}]',
327
+ },
328
+ expectedOutput: "List of platforms sorted by name in ascending order",
329
+ },
330
+ ],
331
+ hints: [
332
+ "Use 'default' project key when user doesn't specify one",
333
+ "Default pagination: start=0, page=1, limit=10",
334
+ "Filter parameter should be a JSON string with filter criteria",
335
+ "Sort parameter should be a JSON string with sort criteria",
336
+ "Default sort: platformID descending",
337
+ "Common filter fields: 'name' (string), 'isArchived' (list of 0,1) for archive status",
338
+ "IMPORTANT: Always use 'isArchived' field for filtering by archive status, even though response shows 'isPlatformArchived'",
339
+ "Archive status values: 0 = active/non-archived, 1 = archived",
340
+ "Empty payload {} is sent when no parameters are provided",
341
+ "Use platforms for cross-platform testing and environment selection",
342
+ ],
343
+ outputDescription: "JSON object with platforms list and pagination metadata",
344
+ readOnly: true,
345
+ idempotent: true,
346
+ openWorld: false,
347
+ },
348
+ ];