targetprocess-mcp-server 2.0.6 → 2.1.7-a
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/README.md +1 -2
- package/build/index.js +17 -17
- package/build/tp.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,14 +51,13 @@ Cards — Read
|
|
|
51
51
|
- `get_bug_comments` — Get comments on a bug (id, optional results)
|
|
52
52
|
- `get_user_story_comments` — Get comments on a user story (id, optional results)
|
|
53
53
|
- `get_user_story_test_cases` — Fetch the linked test plan and all its test cases (with steps) for a user story (resourceId)
|
|
54
|
-
- `
|
|
54
|
+
- `search_tp_cards` — Search TP cards by keyword or phrase in description (keyword, optional entityType: UserStories | Bugs, default: UserStories)
|
|
55
55
|
|
|
56
56
|
Cards — Write
|
|
57
57
|
- `add_comment` — Post a comment to any card (id, comment)
|
|
58
58
|
- `create_bug` — Create a standalone bug (title, bugContent, optional origin)
|
|
59
59
|
- `create_bug_based_on_card` — Create a bug linked to an existing user story or bug card (card object with id+type, title, bugContent, optional origin)
|
|
60
60
|
- `create_test_plan` — Create a test plan linked to a UserStory, Bug, or Feature (title, resourceId, optional resourceType, optional description/startDate/endDate)
|
|
61
|
-
- `add_test_cases` — Create a test plan and add generated test cases to it in one call (resourceId, testPlanTitle, testCases array of {name, description}, optional resourceType)
|
|
62
61
|
|
|
63
62
|
Test Case Workflows
|
|
64
63
|
- `write_test_cases` — Fetch a card (UserStory, Bug, or Feature) by ID and trigger the full test case writing workflow: Claude analyzes the card, generates detailed test cases covering happy path, edge cases, and error scenarios, creates a linked test plan via `create_test_plan`, then calls `add_test_cases_to_test_plan`. Each test case description contains Preconditions and Test Type as HTML; steps are passed as a structured array (resourceId, optional resourceType)
|
package/build/index.js
CHANGED
|
@@ -332,34 +332,34 @@ server.registerTool('get_release_open_user_stories', {
|
|
|
332
332
|
}],
|
|
333
333
|
};
|
|
334
334
|
});
|
|
335
|
-
server.registerTool('
|
|
336
|
-
title: 'Search TP cards
|
|
337
|
-
description: `Searches
|
|
335
|
+
server.registerTool('search_tp_cards', {
|
|
336
|
+
title: 'Search TP cards by keyword or phrase in description',
|
|
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
|
+
NOTE: after results are returned, try analyze and filter results by most relevant to what user is looking for in the description text`,
|
|
338
339
|
inputSchema: {
|
|
339
340
|
keyword: z.string()
|
|
340
|
-
.describe('Keyword or partial name or keyphrase to search for'),
|
|
341
|
+
.describe('Keyword or partial name or keyphrase to search for in description'),
|
|
342
|
+
entityType: z.enum(["UserStories", "Bugs"])
|
|
343
|
+
.default("UserStories")
|
|
344
|
+
.optional()
|
|
345
|
+
.describe('Type of TP entity to search — UserStories or Bugs (default: UserStories)'),
|
|
341
346
|
},
|
|
342
|
-
}, async ({ keyword }) => {
|
|
343
|
-
const results = await
|
|
344
|
-
|
|
345
|
-
tp.searchContainsNameText({ text: keyword, entityType: "Bugs" }),
|
|
346
|
-
tp.searchContainsNameText({ text: keyword, entityType: "Features" }),
|
|
347
|
-
]);
|
|
348
|
-
const generalResults = results.map((item) => item.Items).flat();
|
|
349
|
-
if (!generalResults) {
|
|
347
|
+
}, async ({ keyword, entityType = "UserStories" }) => {
|
|
348
|
+
const results = await tp.searchContainsDescriptionText({ text: keyword, entityType });
|
|
349
|
+
if (!results) {
|
|
350
350
|
return {
|
|
351
351
|
content: [{
|
|
352
352
|
type: 'text',
|
|
353
|
-
text: `Failed to
|
|
353
|
+
text: `Failed to search for keyword: "${keyword}"\n JSON: ${JSON.stringify(results, null, 2)}`
|
|
354
354
|
}],
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
const items =
|
|
357
|
+
const items = results.Items || [];
|
|
358
358
|
if (items.length == 0) {
|
|
359
359
|
return {
|
|
360
360
|
content: [{
|
|
361
|
-
type:
|
|
362
|
-
text: `
|
|
361
|
+
type: 'text',
|
|
362
|
+
text: `Failed to find card by keyword: "${keyword}"\n JSON: ${JSON.stringify(results, null, 2)}`
|
|
363
363
|
}],
|
|
364
364
|
};
|
|
365
365
|
}
|
|
@@ -1030,7 +1030,7 @@ server.registerTool('write_test_cases', {
|
|
|
1030
1030
|
- name: concise action-oriented title
|
|
1031
1031
|
- description: HTML <div> with Preconditions and Test Type sections only (no steps here)
|
|
1032
1032
|
- steps: ordered array of { description: "<step action>", result: "<expected result>" }
|
|
1033
|
-
4) Call "create_test_plan" tool passing: resourceId (the card id), resourceType, testPlanTitle (use the card name/title)
|
|
1033
|
+
4) Call "create_test_plan" tool passing: resourceId (the card id), resourceType, testPlanTitle (use the card name/title), NOTE: IF test plan already exists - skip this step and proceed to step 5.
|
|
1034
1034
|
5) Call "add_test_cases_to_test_plan" tool passing: testPlanId (the test plan id), and the testCases array with name, description, and steps`,
|
|
1035
1035
|
inputSchema: {
|
|
1036
1036
|
resourceId: z.string()
|
package/build/tp.js
CHANGED
|
@@ -43,6 +43,7 @@ export class TpClient {
|
|
|
43
43
|
async get(params) {
|
|
44
44
|
params.param["access_token"] = this.token;
|
|
45
45
|
let _url = this.params(params);
|
|
46
|
+
console.error(JSON.stringify({ "TP_URL": _url }, null, 2));
|
|
46
47
|
try {
|
|
47
48
|
const response = await fetch(_url, {
|
|
48
49
|
method: "GET",
|
|
@@ -290,6 +291,16 @@ export class TpClient {
|
|
|
290
291
|
},
|
|
291
292
|
});
|
|
292
293
|
}
|
|
294
|
+
async searchContainsDescriptionText({ text, entityType }) {
|
|
295
|
+
return this.get({
|
|
296
|
+
pathParam: { [entityType]: '' },
|
|
297
|
+
param: {
|
|
298
|
+
"where": `Description contains '${text}' and EntityState.Name eq 'Done'`,
|
|
299
|
+
"format": "json",
|
|
300
|
+
"take": "50",
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
}
|
|
293
304
|
async getCurrentReleases() {
|
|
294
305
|
return this.get({
|
|
295
306
|
pathParam: { "Releases": '' },
|