zephyr-scale-mcp-server 0.4.7 → 0.5.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/build/tool-handlers.js +8 -4
- package/build/tool-schemas.js +6 -2
- package/package.json +1 -1
- package/src/tool-handlers.ts +7 -4
- package/src/tool-schemas.ts +6 -2
- package/src/types.ts +1 -0
package/build/tool-handlers.js
CHANGED
|
@@ -808,9 +808,9 @@ export class ZephyrToolHandlers {
|
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
async searchTestRuns(args) {
|
|
811
|
-
const { project_key, folder, max_results = 200, fields } = args;
|
|
812
|
-
if (!project_key && !folder) {
|
|
813
|
-
throw new McpError(ErrorCode.InvalidParams, 'At least one of project_key or
|
|
811
|
+
const { project_key, folder, folder_id, max_results = 200, fields } = args;
|
|
812
|
+
if (!project_key && !folder && !folder_id) {
|
|
813
|
+
throw new McpError(ErrorCode.InvalidParams, 'At least one of project_key, folder, or folder_id must be provided.');
|
|
814
814
|
}
|
|
815
815
|
if (this.jiraConfig.type === 'cloud') {
|
|
816
816
|
try {
|
|
@@ -818,7 +818,11 @@ export class ZephyrToolHandlers {
|
|
|
818
818
|
const params = { maxResults: max_results };
|
|
819
819
|
if (project_key)
|
|
820
820
|
params.projectKey = project_key;
|
|
821
|
-
|
|
821
|
+
// folder_id takes precedence over folder path
|
|
822
|
+
if (folder_id) {
|
|
823
|
+
params.folderId = folder_id;
|
|
824
|
+
}
|
|
825
|
+
else if (folder && project_key) {
|
|
822
826
|
const folderId = await resolveFolderIdByPath(this.axiosInstance, project_key, folder, 'TEST_CYCLE');
|
|
823
827
|
if (folderId !== null)
|
|
824
828
|
params.folderId = folderId;
|
package/build/tool-schemas.js
CHANGED
|
@@ -351,7 +351,7 @@ export const toolSchemas = [
|
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
name: 'search_test_runs',
|
|
354
|
-
description: 'Search for test runs using a query. Supports filtering by projectKey and/or folder path.',
|
|
354
|
+
description: 'Search for test runs using a query. Supports filtering by projectKey and/or folder path. On Cloud, only returns cycles in the exact folder (not sub-folders). Use folder_id for direct numeric ID lookup (skips path resolution).',
|
|
355
355
|
inputSchema: {
|
|
356
356
|
type: 'object',
|
|
357
357
|
properties: {
|
|
@@ -361,7 +361,11 @@ export const toolSchemas = [
|
|
|
361
361
|
},
|
|
362
362
|
folder: {
|
|
363
363
|
type: 'string',
|
|
364
|
-
description: 'Folder path to filter test runs by (e.g., "/MyFolder/SubFolder")',
|
|
364
|
+
description: 'Folder path to filter test runs by (e.g., "/MyFolder/SubFolder"). Resolved to a numeric folderId on Cloud.',
|
|
365
|
+
},
|
|
366
|
+
folder_id: {
|
|
367
|
+
type: 'number',
|
|
368
|
+
description: 'Numeric folder ID to filter test runs by (optional). If provided, takes precedence over folder path and skips path resolution. Use this when you already know the folder ID.',
|
|
365
369
|
},
|
|
366
370
|
max_results: {
|
|
367
371
|
type: 'number',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-scale-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for Zephyr Scale test case management with comprehensive STEP_BY_STEP, PLAIN_TEXT, and BDD support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
package/src/tool-handlers.ts
CHANGED
|
@@ -879,10 +879,10 @@ export class ZephyrToolHandlers {
|
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
async searchTestRuns(args: SearchTestRunsArgs) {
|
|
882
|
-
const { project_key, folder, max_results = 200, fields } = args;
|
|
882
|
+
const { project_key, folder, folder_id, max_results = 200, fields } = args;
|
|
883
883
|
|
|
884
|
-
if (!project_key && !folder) {
|
|
885
|
-
throw new McpError(ErrorCode.InvalidParams, 'At least one of project_key or
|
|
884
|
+
if (!project_key && !folder && !folder_id) {
|
|
885
|
+
throw new McpError(ErrorCode.InvalidParams, 'At least one of project_key, folder, or folder_id must be provided.');
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
if (this.jiraConfig.type === 'cloud') {
|
|
@@ -891,7 +891,10 @@ export class ZephyrToolHandlers {
|
|
|
891
891
|
const params: Record<string, any> = { maxResults: max_results };
|
|
892
892
|
if (project_key) params.projectKey = project_key;
|
|
893
893
|
|
|
894
|
-
|
|
894
|
+
// folder_id takes precedence over folder path
|
|
895
|
+
if (folder_id) {
|
|
896
|
+
params.folderId = folder_id;
|
|
897
|
+
} else if (folder && project_key) {
|
|
895
898
|
const folderId = await resolveFolderIdByPath(
|
|
896
899
|
this.axiosInstance, project_key, folder, 'TEST_CYCLE'
|
|
897
900
|
);
|
package/src/tool-schemas.ts
CHANGED
|
@@ -351,7 +351,7 @@ export const toolSchemas = [
|
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
name: 'search_test_runs',
|
|
354
|
-
description: 'Search for test runs using a query. Supports filtering by projectKey and/or folder path.',
|
|
354
|
+
description: 'Search for test runs using a query. Supports filtering by projectKey and/or folder path. On Cloud, only returns cycles in the exact folder (not sub-folders). Use folder_id for direct numeric ID lookup (skips path resolution).',
|
|
355
355
|
inputSchema: {
|
|
356
356
|
type: 'object',
|
|
357
357
|
properties: {
|
|
@@ -361,7 +361,11 @@ export const toolSchemas = [
|
|
|
361
361
|
},
|
|
362
362
|
folder: {
|
|
363
363
|
type: 'string',
|
|
364
|
-
description: 'Folder path to filter test runs by (e.g., "/MyFolder/SubFolder")',
|
|
364
|
+
description: 'Folder path to filter test runs by (e.g., "/MyFolder/SubFolder"). Resolved to a numeric folderId on Cloud.',
|
|
365
|
+
},
|
|
366
|
+
folder_id: {
|
|
367
|
+
type: 'number',
|
|
368
|
+
description: 'Numeric folder ID to filter test runs by (optional). If provided, takes precedence over folder path and skips path resolution. Use this when you already know the folder ID.',
|
|
365
369
|
},
|
|
366
370
|
max_results: {
|
|
367
371
|
type: 'number',
|