@qase/mcp-server 3.2.0 → 3.2.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 +7 -0
- package/build/operations-v2/meta/discover.js +3 -2
- package/build/operations-v2/meta/discover.js.map +1 -1
- package/build/server-instructions.d.ts +1 -1
- package/build/server-instructions.d.ts.map +1 -1
- package/build/server-instructions.js +1 -1
- package/build/utils/registry.d.ts +5 -2
- package/build/utils/registry.d.ts.map +1 -1
- package/build/utils/registry.js +23 -5
- package/build/utils/registry.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.2.1]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`qase_discover_tools` answers a sentence, not only two or three exact words.** A query used to match only tools containing every one of its words, so a request phrased as a sentence ("tool help QQL search project context") found nothing, and the agent decided the tool did not exist. When no tool contains every word, the closest partial matches now come back, the most words first, at most eight. Queries that did match keep their result.
|
|
13
|
+
- **The server instructions cover clients that defer part of the tool list.** ChatGPT showed the model 27 of the 42 tools and kept the rest, `qql_search` and `qase_triage_defect` among them, behind its own tool search. The instructions now tell the agent to look a named tool up with that search before concluding it is unavailable.
|
|
14
|
+
|
|
8
15
|
## [3.2.0]
|
|
9
16
|
|
|
10
17
|
### Added
|
|
@@ -56,8 +56,9 @@ toolRegistry.register({
|
|
|
56
56
|
name: 'qase_discover_tools',
|
|
57
57
|
title: 'Discover more tools',
|
|
58
58
|
description: 'Search the tool catalogue by what you are trying to do — "delete", "milestone", "review", "custom field" — and get back the matching tools with their descriptions. Every tool is already listed and callable; use this when you do not know which one fits, rather than re-reading the whole list. Cost: no API call, matching happens in memory, about 3ms.',
|
|
59
|
-
help:
|
|
60
|
-
'
|
|
59
|
+
help: 'Searches tool names and descriptions. Tools containing every word of the query come first; ' +
|
|
60
|
+
'when none does, the closest partial matches come back instead, the most words first, so two ' +
|
|
61
|
+
'or three words still beat a sentence. `category` narrows the result ' +
|
|
61
62
|
'to read, write, delete or composite tools. Since 3.0.0 nothing is hidden: the full catalogue ' +
|
|
62
63
|
'is in your tool list from the first request, so a match here is callable at once — there is ' +
|
|
63
64
|
'no activation step and no notification to wait for. Read qase_tool_help for the full ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/operations-v2/meta/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qDAAqD;QACnD,wDAAwD,CAC3D;IACH,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;SACrD,QAAQ,EAAE;SACV,QAAQ,CAAC,yBAAyB,CAAC;CACvC,CAAC,CAAC;AAEH,KAAK,UAAU,OAAO,CAAC,IAA4B;IACjD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACjC,IAAI,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAA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BACX,OAAO,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;gBACvC,KAAK,MAAM;oBACT,OAAO,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;gBACpC,KAAK,OAAO;oBACV,OAAO,CAAC,GAAG,EAAE,YAAY,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC;gBACrD,KAAK,WAAW;oBACd,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;wBAC7B,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;wBACjC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CACtC,CAAC;gBACJ;oBACE,OAAO,IAAI,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,MAAM;QACrB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACzB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,eAAe,IAAI,KAAK;SACrD,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,+VAA+V;IACjW,IAAI,EACF,6FAA6F;QAC7F,8FAA8F;QAC9F,sEAAsE;QACtE,+FAA+F;QAC/F,8FAA8F;QAC9F,uFAAuF;QACvF,+DAA+D;IACjE,MAAM,EAAE,MAAM;IACd,OAAO;IACP,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,mBAAmB;CAClC,CAAC,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* chosen. This is the cheapest place to answer "which tool for this job" —
|
|
6
6
|
* cheaper than the agent discovering it by making the wrong call first.
|
|
7
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\nBefore the first call of a tool you have not used in this session, read qase_tool_help for it: descriptions are kept short, and the argument semantics, limits and what cannot be undone live there. 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.\n\nWriting follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_suite_upsert, qase_defect_upsert all create when `id` is omitted and update when it's given, as do every other upsert tool. 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 \u2014 its `files` argument sends up to 20 in one request \u2014 and are referenced by hash.\n\nTest plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too \u2014 search qase_discover_tools with \"plan\", \"milestone\", \"environment\", \"shared step\", \"project\" or \"custom field\" if you do not know the tool's name. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.\n\nEvery tool is listed from the first request \u2014 deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent.\n\nEnum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.";
|
|
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\nBefore the first call of a tool you have not used in this session, read qase_tool_help for it: descriptions are kept short, and the argument semantics, limits and what cannot be undone live there. 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.\n\nWriting follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_suite_upsert, qase_defect_upsert all create when `id` is omitted and update when it's given, as do every other upsert tool. 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 \u2014 its `files` argument sends up to 20 in one request \u2014 and are referenced by hash.\n\nTest plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too \u2014 search qase_discover_tools with \"plan\", \"milestone\", \"environment\", \"shared step\", \"project\" or \"custom field\" if you do not know the tool's name. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.\n\nEvery tool is listed from the first request \u2014 deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent. Some clients load only part of a long tool list up front and keep the rest behind their own tool search; if a tool named here is not among the tools you can call, find it with that search before concluding it is unavailable.\n\nEnum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.";
|
|
9
9
|
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,y4FAYqF,CAAC"}
|
|
@@ -15,7 +15,7 @@ Writing follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_
|
|
|
15
15
|
|
|
16
16
|
Test plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too — search qase_discover_tools with "plan", "milestone", "environment", "shared step", "project" or "custom field" if you do not know the tool's name. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.
|
|
17
17
|
|
|
18
|
-
Every tool is listed from the first request — deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent.
|
|
18
|
+
Every tool is listed from the first request — deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent. Some clients load only part of a long tool list up front and keep the rest behind their own tool search; if a tool named here is not among the tools you can call, find it with that search before concluding it is unavailable.
|
|
19
19
|
|
|
20
20
|
Enum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.`;
|
|
21
21
|
//# sourceMappingURL=server-instructions.js.map
|
|
@@ -90,8 +90,11 @@ export declare class ToolRegistry {
|
|
|
90
90
|
*/
|
|
91
91
|
getDefinitions(): Tool[];
|
|
92
92
|
/**
|
|
93
|
-
* Search tools by name or description
|
|
94
|
-
*
|
|
93
|
+
* Search tools by name or description, case-insensitively, word by word.
|
|
94
|
+
*
|
|
95
|
+
* Tools that contain every word come back in name order. When none does,
|
|
96
|
+
* the tools that contain some of the words come back instead, the most
|
|
97
|
+
* words first.
|
|
95
98
|
*/
|
|
96
99
|
searchTools(query: string): Tool[];
|
|
97
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AAEH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AAEH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AA6CpE,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,eAAe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9B,CAAC"}
|
package/build/utils/registry.js
CHANGED
|
@@ -41,6 +41,8 @@ function byName(a, b) {
|
|
|
41
41
|
return -1;
|
|
42
42
|
return a.name > b.name ? 1 : 0;
|
|
43
43
|
}
|
|
44
|
+
/** How many partial matches a search returns when no tool matches every word. */
|
|
45
|
+
const PARTIAL_MATCH_LIMIT = 8;
|
|
44
46
|
/**
|
|
45
47
|
* Annotation hints as the MCP spec defaults them when a tool says nothing.
|
|
46
48
|
* A hint equal to its default carries no information, so the wire projection
|
|
@@ -175,8 +177,11 @@ export class ToolRegistry {
|
|
|
175
177
|
return Array.from(this.tools.values()).sort(byName);
|
|
176
178
|
}
|
|
177
179
|
/**
|
|
178
|
-
* Search tools by name or description
|
|
179
|
-
*
|
|
180
|
+
* Search tools by name or description, case-insensitively, word by word.
|
|
181
|
+
*
|
|
182
|
+
* Tools that contain every word come back in name order. When none does,
|
|
183
|
+
* the tools that contain some of the words come back instead, the most
|
|
184
|
+
* words first.
|
|
180
185
|
*/
|
|
181
186
|
searchTools(query) {
|
|
182
187
|
// Match on words rather than on the whole string: a caller asking for
|
|
@@ -186,10 +191,23 @@ export class ToolRegistry {
|
|
|
186
191
|
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
|
|
187
192
|
if (words.length === 0)
|
|
188
193
|
return [];
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
|
|
194
|
+
const scored = this.getDefinitions().map((tool) => {
|
|
195
|
+
const name = tool.name.toLowerCase();
|
|
196
|
+
const haystack = `${name} ${tool.description ?? ''}`.toLowerCase();
|
|
197
|
+
const hits = words.filter((word) => haystack.includes(word));
|
|
198
|
+
return { tool, hits: hits.length, nameHits: hits.filter((w) => name.includes(w)).length };
|
|
192
199
|
});
|
|
200
|
+
const complete = scored.filter((s) => s.hits === words.length);
|
|
201
|
+
if (complete.length)
|
|
202
|
+
return complete.map((s) => s.tool);
|
|
203
|
+
// An agent that cannot see a tool describes the job in a sentence, and a
|
|
204
|
+
// sentence rarely shares every word with one tool. Requiring all of them
|
|
205
|
+
// answered "found 0" and the agent concluded the tool did not exist.
|
|
206
|
+
return scored
|
|
207
|
+
.filter((s) => s.hits > 0)
|
|
208
|
+
.sort((a, b) => b.hits - a.hits || b.nameHits - a.nameHits)
|
|
209
|
+
.slice(0, PARTIAL_MATCH_LIMIT)
|
|
210
|
+
.map((s) => s.tool);
|
|
193
211
|
}
|
|
194
212
|
/**
|
|
195
213
|
* Get handler function for a specific tool
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;GAGG;AACH;;;;;;;;GAQG;AACH,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAE5C,0DAA0D;AAC1D,SAAS,sBAAsB,CAAC,IAAa;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,IAAI;YAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;QACtD,OAAO;IACT,CAAC;IACD,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO;IAEtD,MAAM,MAAM,GAAG,IAA+B,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC9B,IAAI,MAAM,CAAC,OAAO,KAAK,kBAAkB;YAAE,OAAO,MAAM,CAAC,OAAO,CAAC;QACjE,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,kBAAkB;YAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IACpE,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QAAE,sBAAsB,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,SAAS,MAAM,CAAC,CAAmB,EAAE,CAAmB;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CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CAAC,IAAY;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACrB,CAAC"}
|
package/build/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.2.
|
|
1
|
+
export declare const VERSION = "3.2.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/version.js
CHANGED
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"url": "https://github.com/qase-tms/qase-mcp-server",
|
|
16
16
|
"source": "github"
|
|
17
17
|
},
|
|
18
|
-
"version": "3.2.
|
|
18
|
+
"version": "3.2.1",
|
|
19
19
|
"packages": [
|
|
20
20
|
{
|
|
21
21
|
"registryType": "npm",
|
|
22
22
|
"identifier": "@qase/mcp-server",
|
|
23
|
-
"version": "3.2.
|
|
23
|
+
"version": "3.2.1",
|
|
24
24
|
"transport": {
|
|
25
25
|
"type": "stdio"
|
|
26
26
|
},
|