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.
Files changed (2) hide show
  1. package/build/index.js +7 -4
  2. 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 tp.searchContainsDescriptionText({ text: keyword, entityType });
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.Items || [];
361
+ const items = results.map((item) => item.Items).flat();
359
362
  if (items.length == 0) {
360
363
  return {
361
364
  content: [{
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "2.1.8a",
28
+ "version": "2.1.8c",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [