@qase/mcp-server 2.3.1 → 2.4.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/CHANGELOG.md +38 -0
- package/build/operations-v2/composites/ci-report.js +68 -14
- package/build/operations-v2/composites/ci-report.js.map +1 -1
- package/build/operations-v2/composites/regression-run.js +8 -3
- package/build/operations-v2/composites/regression-run.js.map +1 -1
- package/build/operations-v2/composites/triage-defect.js +15 -5
- package/build/operations-v2/composites/triage-defect.js.map +1 -1
- package/build/operations-v2/escape/api.js +27 -5
- package/build/operations-v2/escape/api.js.map +1 -1
- package/build/operations-v2/index.d.ts +2 -0
- package/build/operations-v2/index.d.ts.map +1 -1
- package/build/operations-v2/index.js +2 -0
- package/build/operations-v2/index.js.map +1 -1
- package/build/operations-v2/meta/discover.js +8 -3
- package/build/operations-v2/meta/discover.js.map +1 -1
- package/build/operations-v2/qql/index.js +19 -6
- package/build/operations-v2/qql/index.js.map +1 -1
- package/build/operations-v2/read/get.js +10 -4
- package/build/operations-v2/read/get.js.map +1 -1
- package/build/operations-v2/read/project-context.js +11 -7
- package/build/operations-v2/read/project-context.js.map +1 -1
- package/build/operations-v2/write/attachments.js +17 -8
- package/build/operations-v2/write/attachments.js.map +1 -1
- package/build/operations-v2/write/cases-bulk.js +9 -5
- package/build/operations-v2/write/cases-bulk.js.map +1 -1
- package/build/operations-v2/write/cases.js +16 -6
- package/build/operations-v2/write/cases.js.map +1 -1
- package/build/operations-v2/write/custom-fields.d.ts +2 -0
- package/build/operations-v2/write/custom-fields.d.ts.map +1 -0
- package/build/operations-v2/write/custom-fields.js +226 -0
- package/build/operations-v2/write/custom-fields.js.map +1 -0
- package/build/operations-v2/write/defects.js +26 -4
- package/build/operations-v2/write/defects.js.map +1 -1
- package/build/operations-v2/write/environments.js +11 -3
- package/build/operations-v2/write/environments.js.map +1 -1
- package/build/operations-v2/write/external-issues.js +7 -5
- package/build/operations-v2/write/external-issues.js.map +1 -1
- package/build/operations-v2/write/milestones.js +10 -3
- package/build/operations-v2/write/milestones.js.map +1 -1
- package/build/operations-v2/write/plans.js +11 -3
- package/build/operations-v2/write/plans.js.map +1 -1
- package/build/operations-v2/write/projects.d.ts +2 -0
- package/build/operations-v2/write/projects.d.ts.map +1 -0
- package/build/operations-v2/write/projects.js +77 -0
- package/build/operations-v2/write/projects.js.map +1 -0
- package/build/operations-v2/write/results.js +48 -10
- package/build/operations-v2/write/results.js.map +1 -1
- package/build/operations-v2/write/reviews.js +28 -13
- package/build/operations-v2/write/reviews.js.map +1 -1
- package/build/operations-v2/write/runs.js +20 -3
- package/build/operations-v2/write/runs.js.map +1 -1
- package/build/operations-v2/write/shared-steps.js +11 -3
- package/build/operations-v2/write/shared-steps.js.map +1 -1
- package/build/operations-v2/write/suites.js +17 -5
- package/build/operations-v2/write/suites.js.map +1 -1
- package/build/server-instructions.d.ts +9 -0
- package/build/server-instructions.d.ts.map +1 -0
- package/build/server-instructions.js +21 -0
- package/build/server-instructions.js.map +1 -0
- package/build/server.d.ts.map +1 -1
- package/build/server.js +2 -0
- package/build/server.js.map +1 -1
- package/build/utils/case-enums.d.ts +6 -0
- package/build/utils/case-enums.d.ts.map +1 -1
- package/build/utils/case-enums.js +11 -3
- package/build/utils/case-enums.js.map +1 -1
- package/build/utils/registry.d.ts.map +1 -1
- package/build/utils/registry.js +11 -3
- package/build/utils/registry.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/docs/tools.md +2 -2
- package/package.json +2 -2
- package/server.json +2 -2
|
@@ -17,7 +17,8 @@ const DeleteSchema = z.object({
|
|
|
17
17
|
delete_cases: z
|
|
18
18
|
.boolean()
|
|
19
19
|
.optional()
|
|
20
|
-
.describe('
|
|
20
|
+
.describe('Has no effect today: the server sends a field this endpoint does not accept, so the ' +
|
|
21
|
+
'cases are deleted either way. Kept so existing callers do not break.'),
|
|
21
22
|
});
|
|
22
23
|
async function upsert(args) {
|
|
23
24
|
const client = getApiClient();
|
|
@@ -44,8 +45,11 @@ async function del(args) {
|
|
|
44
45
|
}
|
|
45
46
|
toolRegistry.register({
|
|
46
47
|
name: 'qase_suite_upsert',
|
|
47
|
-
description: 'Create or update a test suite.
|
|
48
|
-
'
|
|
48
|
+
description: 'Create or update a test suite — the folder cases live in. Without `id` it creates, with `id` ' +
|
|
49
|
+
'it updates. Nest a suite by passing `parent_id`; the whole existing tree comes back from ' +
|
|
50
|
+
'qase_project_context, so read that first rather than guessing at parent IDs. Building a deep ' +
|
|
51
|
+
'tree means one call per node, so create parents before children and reuse the IDs returned. ' +
|
|
52
|
+
'Cost: one API call, about 0.5s.',
|
|
49
53
|
schema: UpsertSchema,
|
|
50
54
|
handler: upsert,
|
|
51
55
|
annotations: CreateAnnotation,
|
|
@@ -53,8 +57,16 @@ toolRegistry.register({
|
|
|
53
57
|
});
|
|
54
58
|
toolRegistry.register({
|
|
55
59
|
name: 'qase_suite_delete',
|
|
56
|
-
description: 'Delete a test suite
|
|
57
|
-
'
|
|
60
|
+
description: 'Delete a test suite by project code and suite ID. WARNING: the cases inside are deleted with ' +
|
|
61
|
+
'it, along with their history, and this cannot be undone. Deleting a suite with children ' +
|
|
62
|
+
'takes the whole subtree and everything in it, so read the tree from qase_project_context and ' +
|
|
63
|
+
'move anything worth keeping — qase_case_upsert with a different suite_id — before calling. ' +
|
|
64
|
+
'The `delete_cases` parameter currently has no effect: the server sends a field this endpoint ' +
|
|
65
|
+
'does not accept, so cases are deleted whether it is true, false, or omitted. Verified ' +
|
|
66
|
+
"against the live API. The endpoint's own mechanism for sparing them is a destination suite " +
|
|
67
|
+
'to move them into, which this tool does not expose yet. Deletion asks the user for ' +
|
|
68
|
+
'confirmation and does not proceed without it. Cost: one API call, about 0.4s, longer for a ' +
|
|
69
|
+
'large subtree.',
|
|
58
70
|
schema: DeleteSchema,
|
|
59
71
|
handler: del,
|
|
60
72
|
annotations: DeleteAnnotation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suites.js","sourceRoot":"","sources":["../../../src/operations-v2/write/suites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAExE,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,iBAAiB;IACvB,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;IACxF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;IACzD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CAC1F,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,iBAAiB;IACvB,EAAE,EAAE,QAAQ;IACZ,YAAY,EAAE,CAAC;SACZ,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"suites.js","sourceRoot":"","sources":["../../../src/operations-v2/write/suites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,C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AE,EAAE;QACJ,MAAM,eAAe,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;IAC9C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,+FAA+F;QAC/F,2FAA2F;QAC3F,+FAA+F;QAC/F,8FAA8F;QAC9F,iCAAiC;IACnC,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,cAAc;CAC3B,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,+FAA+F;QAC/F,0FAA0F;QAC1F,+FAA+F;QAC/F,6FAA6F;QAC7F,+FAA+F;QAC/F,wFAAwF;QACxF,6FAA6F;QAC7F,qFAAqF;QACrF,6FAA6F;QAC7F,gBAAgB;IAClB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,cAAc;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server instructions
|
|
3
|
+
*
|
|
4
|
+
* Sent once, in the response to `initialize`, and read before any tool is
|
|
5
|
+
* chosen. This is the cheapest place to answer "which tool for this job" —
|
|
6
|
+
* cheaper than the agent discovering it by making the wrong call first.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SERVER_INSTRUCTIONS = "Qase is a test management platform: test cases, suites, runs, results, defects, plans, milestones, environments, and reviews, organized by project code. This server reads and writes all of it, and reports CI results directly.\n\nStart any new project with qase_project_context: one call returns the suite tree, milestones, environments, custom fields, and users, instead of six separate list calls. For a single known record, use qase_get. For anything filtered, cross-project, or aggregated (\"failed results this week\", \"open blockers\"), use qql_search, backed by qql_help for syntax and field references per entity.\n\nReach for the batch call before the loop. One qql_search returns ten cases about four times faster than ten qase_get calls, and one qase_case_bulk_create writes ten cases about four times faster than ten qase_case_upsert calls. Every tool's description ends with what the call costs; read it before fetching or writing records one at a time.\n\nWriting follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_plan_upsert, qase_suite_upsert, qase_defect_upsert all create when `id` is omitted and update when it's given. A case describes what to test; a result (qase_result_record) describes what happened when it ran, into an existing run. For CI, qase_ci_report collapses create-run, record-results, and complete-run into one call. qase_regression_run builds a run from a suite, plan, or explicit case list in one step. Attachments upload separately via qase_attachment_upload and are referenced by hash.\n\nProjects and workspace-wide custom fields are managed here too: qase_project_create and qase_project_delete, qase_custom_field_upsert and qase_custom_field_delete. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.\n\nOnly core tools are visible by default. Deletes, shared steps and parameters, attachments, external issue links, case reviews, defect triage, and project and custom-field management exist but start hidden: call qase_discover_tools with what you are trying to do to find and activate them, rather than assuming a capability does not exist.\n\nEnum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.";
|
|
9
|
+
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,yuEAYqF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server instructions
|
|
3
|
+
*
|
|
4
|
+
* Sent once, in the response to `initialize`, and read before any tool is
|
|
5
|
+
* chosen. This is the cheapest place to answer "which tool for this job" —
|
|
6
|
+
* cheaper than the agent discovering it by making the wrong call first.
|
|
7
|
+
*/
|
|
8
|
+
export const SERVER_INSTRUCTIONS = `Qase is a test management platform: test cases, suites, runs, results, defects, plans, milestones, environments, and reviews, organized by project code. This server reads and writes all of it, and reports CI results directly.
|
|
9
|
+
|
|
10
|
+
Start any new project with qase_project_context: one call returns the suite tree, milestones, environments, custom fields, and users, instead of six separate list calls. For a single known record, use qase_get. For anything filtered, cross-project, or aggregated ("failed results this week", "open blockers"), use qql_search, backed by qql_help for syntax and field references per entity.
|
|
11
|
+
|
|
12
|
+
Reach for the batch call before the loop. One qql_search returns ten cases about four times faster than ten qase_get calls, and one qase_case_bulk_create writes ten cases about four times faster than ten qase_case_upsert calls. Every tool's description ends with what the call costs; read it before fetching or writing records one at a time.
|
|
13
|
+
|
|
14
|
+
Writing follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_plan_upsert, qase_suite_upsert, qase_defect_upsert all create when \`id\` is omitted and update when it's given. A case describes what to test; a result (qase_result_record) describes what happened when it ran, into an existing run. For CI, qase_ci_report collapses create-run, record-results, and complete-run into one call. qase_regression_run builds a run from a suite, plan, or explicit case list in one step. Attachments upload separately via qase_attachment_upload and are referenced by hash.
|
|
15
|
+
|
|
16
|
+
Projects and workspace-wide custom fields are managed here too: qase_project_create and qase_project_delete, qase_custom_field_upsert and qase_custom_field_delete. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.
|
|
17
|
+
|
|
18
|
+
Only core tools are visible by default. Deletes, shared steps and parameters, attachments, external issue links, case reviews, defect triage, and project and custom-field management exist but start hidden: call qase_discover_tools with what you are trying to do to find and activate them, rather than assuming a capability does not exist.
|
|
19
|
+
|
|
20
|
+
Enum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.`;
|
|
21
|
+
//# sourceMappingURL=server-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;qHAYkF,CAAC"}
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAyBnE,OAAO,0BAA0B,CAAC;AAElC;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA2KrC"}
|
package/build/server.js
CHANGED
|
@@ -18,6 +18,7 @@ import { producerStorage } from './utils/producer-context.js';
|
|
|
18
18
|
import { callIntegrationStorage } from './utils/integration-context.js';
|
|
19
19
|
import { VERSION } from './version.js';
|
|
20
20
|
import { listPrompts, getPrompt } from './prompts/index.js';
|
|
21
|
+
import { SERVER_INSTRUCTIONS } from './server-instructions.js';
|
|
21
22
|
// Import operation modules - each module registers its tools on import
|
|
22
23
|
import './operations-v2/index.js';
|
|
23
24
|
/**
|
|
@@ -36,6 +37,7 @@ export function createServer() {
|
|
|
36
37
|
tools: { listChanged: true },
|
|
37
38
|
prompts: {},
|
|
38
39
|
},
|
|
40
|
+
instructions: SERVER_INSTRUCTIONS,
|
|
39
41
|
});
|
|
40
42
|
/**
|
|
41
43
|
* Handler: List all available tools
|
package/build/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAA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record<string, Record<string, number>>;
|
|
2
|
+
/**
|
|
3
|
+
* Replace enum labels with the numeric IDs the API expects, for the named
|
|
4
|
+
* fields, using the workspace's own system fields — so a workspace that has
|
|
5
|
+
* added its own option is handled as well as the built-in ones.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeEnumFields<T extends Record<string, unknown>>(data: T, fields: readonly string[]): Promise<T>;
|
|
2
8
|
export declare function normalizeCaseEnums<T extends Record<string, unknown>>(caseData: T): Promise<T>;
|
|
3
9
|
/** @internal — used by tests to pre-populate the tenant-scoped shard. */
|
|
4
10
|
export declare function __setCaseEnumCacheForTest(snapshot: SystemFieldMap): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case-enums.d.ts","sourceRoot":"","sources":["../../src/utils/case-enums.ts"],"names":[],"mappings":"AAkCA,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AA+E7D,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxE,QAAQ,EAAE,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"case-enums.d.ts","sourceRoot":"","sources":["../../src/utils/case-enums.ts"],"names":[],"mappings":"AAkCA,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AA+E7D;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxE,QAAQ,EAAE,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED,yEAAyE;AACzE,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvF;AAED,kEAAkE;AAClE,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG/D"}
|
|
@@ -84,10 +84,15 @@ async function getSystemFieldMaps() {
|
|
|
84
84
|
await cache.set(key, fresh, SYSTEM_FIELDS_TTL_MS);
|
|
85
85
|
return fresh;
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Replace enum labels with the numeric IDs the API expects, for the named
|
|
89
|
+
* fields, using the workspace's own system fields — so a workspace that has
|
|
90
|
+
* added its own option is handled as well as the built-in ones.
|
|
91
|
+
*/
|
|
92
|
+
export async function normalizeEnumFields(data, fields) {
|
|
93
|
+
const normalized = { ...data };
|
|
89
94
|
const systemFields = await getSystemFieldMaps();
|
|
90
|
-
for (const field of
|
|
95
|
+
for (const field of fields) {
|
|
91
96
|
const raw = normalized[field];
|
|
92
97
|
const lookup = systemFields[field];
|
|
93
98
|
const mapped = normalizeEnumValue(raw, lookup);
|
|
@@ -97,6 +102,9 @@ export async function normalizeCaseEnums(caseData) {
|
|
|
97
102
|
}
|
|
98
103
|
return normalized;
|
|
99
104
|
}
|
|
105
|
+
export async function normalizeCaseEnums(caseData) {
|
|
106
|
+
return normalizeEnumFields(caseData, caseEnumFields);
|
|
107
|
+
}
|
|
100
108
|
/** @internal — used by tests to pre-populate the tenant-scoped shard. */
|
|
101
109
|
export async function __setCaseEnumCacheForTest(snapshot) {
|
|
102
110
|
const cache = await getCache();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case-enums.js","sourceRoot":"","sources":["../../src/utils/case-enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,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EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAIvC;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAQjC;;;;OAIG;IACH,KAAK,IAAI,IAAI;CAMd;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,eAK5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC"}
|
package/build/utils/registry.js
CHANGED
|
@@ -106,9 +106,17 @@ export class ToolRegistry {
|
|
|
106
106
|
* Searches the full catalog including inactive tools.
|
|
107
107
|
*/
|
|
108
108
|
searchTools(query) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
// Match on words rather than on the whole string: a caller asking for
|
|
110
|
+
// "delete project" means both words, and that phrase appears verbatim in no
|
|
111
|
+
// tool. Matching it literally returned nothing and left every discoverable
|
|
112
|
+
// tool hidden, since search is the only way to reach them.
|
|
113
|
+
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
114
|
+
if (words.length === 0)
|
|
115
|
+
return [];
|
|
116
|
+
return this.getAllTools().filter((t) => {
|
|
117
|
+
const haystack = `${t.name} ${t.description ?? ''}`.toLowerCase();
|
|
118
|
+
return words.every((word) => haystack.includes(word));
|
|
119
|
+
});
|
|
112
120
|
}
|
|
113
121
|
/**
|
|
114
122
|
* Activate tools by name, making them visible in getTools().
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,E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declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/version.js
CHANGED
package/docs/tools.md
CHANGED
|
@@ -42,7 +42,7 @@ Every tool's schema uses "label or numeric ID" strings for Qase's configurable e
|
|
|
42
42
|
| `qase_run_upsert` | Create or update a test run. If `id` is provided, updates; if omitted, creates. | `code`, `id` (optional), `title` (1-255 chars), `description`, `environment_id`, `milestone_id`, `plan_id`, `cases` (case ID array), `tags`, `is_autotest`, `start_time`/`end_time` (RFC3339), `custom_field` | core |
|
|
43
43
|
| `qase_run_complete` | Mark a test run as complete. | `code`, `id` | discoverable |
|
|
44
44
|
| `qase_run_delete` | Delete a test run. | `code`, `id` | discoverable |
|
|
45
|
-
| `qase_result_record` | Record one or more test results into a run. A single entry uses the single-result API, multiple entries use bulk. Each result must include a status; `case_id` is recommended. | `code`, `run_id`, `results` (array,
|
|
45
|
+
| `qase_result_record` | Record one or more test results into a run. A single entry uses the single-result API, multiple entries use bulk. Each result must include a status; `case_id` is recommended. **The bulk endpoint takes at most 200 results per request**, so a longer list is refused before anything is written — split it across consecutive calls. It is refused rather than split automatically because results are append-only: a batch that failed half way could not be unwound, and the natural retry would record the first 200 a second time and leave the run with a wrong pass rate. Use `qase_ci_report` for a finished run, which does split for you. | `code`, `run_id`, `results` (array, 1-200) — each result: `case_id` (optional), `status` (enum: passed, failed, blocked, skipped, invalid), `comment`, `stacktrace`, `time_ms`, `defect` (bool), `steps` (array with `position`, `status`, `comment`, `attachments`), `attachments`, `custom_field` | core |
|
|
46
46
|
| `qase_result_delete` | Delete a test result by run ID and result hash. | `code`, `run_id`, `hash` | discoverable |
|
|
47
47
|
| `qase_suite_upsert` | Create or update a test suite. If `id` is provided, updates the existing suite; if omitted, creates a new one. | `code`, `id` (optional), `title` (1-255 chars), `description`, `preconditions`, `parent_id` (for nesting) | discoverable |
|
|
48
48
|
| `qase_suite_delete` | Delete a test suite. If `delete_cases` is true, removes all cases in the suite; if false or omitted, cases are moved to the parent suite. | `code`, `id`, `delete_cases` (optional bool) | discoverable |
|
|
@@ -86,7 +86,7 @@ Composite tools chain several underlying operations into one call, so an agent a
|
|
|
86
86
|
|
|
87
87
|
| Tool | Description | Key params | Visibility |
|
|
88
88
|
| --- | --- | --- | --- |
|
|
89
|
-
| `qase_ci_report` | Report CI/CD test results in one call: creates a run, records all results, and optionally completes the run. Replaces the 3-4 step manual workflow of create_run → bulk_create_results → complete_run. Designed for CI pipeline integration. | `code`, `title` (1-255 chars), `environment_id` (optional), `results` (array,
|
|
89
|
+
| `qase_ci_report` | Report CI/CD test results in one call: creates a run, records all results, and optionally completes the run. Replaces the 3-4 step manual workflow of create_run → bulk_create_results → complete_run. Designed for CI pipeline integration. **Batches larger than 200 are split across requests automatically**, up to 2000 results in one report; beyond that, report the suite as several runs. If a batch fails part way the error names the run that exists and how many results reached it, so the rest can be recorded with `qase_result_record` rather than by repeating this call, which would create a second run. | `code`, `title` (1-255 chars), `environment_id` (optional), `results` (array, 1-2000: `case_id`, `status` (enum: passed, failed, blocked, skipped, invalid), `comment`, `time_ms`, `stacktrace`, `defect`, `attachments`), `complete` (default true), `is_autotest` (default true) | core |
|
|
90
90
|
| `qase_regression_run` | Set up a regression test run in one call. Accepts case selection by suite IDs, explicit case IDs, or plan ID. Creates the run and adds all matching cases. Replaces the multi-step workflow of find cases → create run → add cases. | `code`, `title` (1-255 chars), `description`, `environment_id`, `milestone_id`, `plan_id`, `suite_ids` (array), `include_cases` (array) | core |
|
|
91
91
|
| `qase_triage_defect` | Create a defect from a test failure. `title`, `actual_result`, and `severity` are all required by the API. The API offers no way to attach runs or results to a defect — the `runs`/`results` arrays seen on a defect are populated by the test runner when a result is reported as a defect — so reference failing results in `actual_result` instead. (`run_id` and `failed_result_ids` were removed in 2.1.0: they were accepted and ignored.) | `code`, `title` (1-255 chars), `actual_result` (required), `severity` (required, enum, see [below](#case-enum-values)), `description`, `tags`, `attachments`, `custom_field` | core |
|
|
92
92
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qase/mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"mcpName": "io.qase/mcp-server",
|
|
5
5
|
"description": "Official MCP server for Qase Test Management Platform",
|
|
6
6
|
"type": "module",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
71
71
|
"axios": "^1.13.5",
|
|
72
|
-
"express": "^
|
|
72
|
+
"express": "^5.2.1",
|
|
73
73
|
"form-data": "^4.0.5",
|
|
74
74
|
"jose": "^6.1.3",
|
|
75
75
|
"lru-cache": "^11.3.5",
|
package/server.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"url": "https://github.com/qase-tms/qase-mcp-server",
|
|
9
9
|
"source": "github"
|
|
10
10
|
},
|
|
11
|
-
"version": "2.
|
|
11
|
+
"version": "2.4.1",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "@qase/mcp-server",
|
|
16
|
-
"version": "2.
|
|
16
|
+
"version": "2.4.1",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|