targetprocess-mcp-server 2.1.8-a → 2.1.8-c
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/index.js +7 -4
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -336,17 +336,20 @@ server.registerTool('search_tp_cards', {
|
|
|
336
336
|
title: 'Search TP cards by keyword or phrase in description',
|
|
337
337
|
description: `Searches TP cards (UserStories or Bugs) by keyword or phrase or partial keyphrase in Card Description e.g. "Text Element", "Font field"
|
|
338
338
|
NOTE: after results are returned, try analyze and filter results by most relevant to what user is looking for in the description text
|
|
339
|
-
FALLBACK: if no results are found, try spliting phrase by spaces and searching for each word`,
|
|
339
|
+
FALLBACK: if no results are found, try spliting phrase by spaces and searching for each word and with "Generals" entity type`,
|
|
340
340
|
inputSchema: {
|
|
341
341
|
keyword: z.string()
|
|
342
342
|
.describe('Keyword or partial name or keyphrase to search for in description'),
|
|
343
|
-
entityType: z.enum(["UserStories", "Bugs"])
|
|
343
|
+
entityType: z.enum(["UserStories", "Bugs", "Generals"])
|
|
344
344
|
.default("UserStories")
|
|
345
345
|
.optional()
|
|
346
346
|
.describe('Type of TP entity to search — UserStories or Bugs (default: UserStories)'),
|
|
347
347
|
},
|
|
348
348
|
}, async ({ keyword, entityType = "UserStories" }) => {
|
|
349
|
-
const results = await
|
|
349
|
+
const results = await Promise.all([
|
|
350
|
+
tp.searchContainsNameText({ text: keyword, entityType }),
|
|
351
|
+
tp.searchContainsDescriptionText({ text: keyword, entityType })
|
|
352
|
+
]);
|
|
350
353
|
if (!results) {
|
|
351
354
|
return {
|
|
352
355
|
content: [{
|
|
@@ -355,7 +358,7 @@ server.registerTool('search_tp_cards', {
|
|
|
355
358
|
}],
|
|
356
359
|
};
|
|
357
360
|
}
|
|
358
|
-
const items = results.
|
|
361
|
+
const items = results.map((item) => item.Items).flat();
|
|
359
362
|
if (items.length == 0) {
|
|
360
363
|
return {
|
|
361
364
|
content: [{
|