targetprocess-mcp-server 1.0.15 → 1.0.16
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 +6 -3
- package/build/index.js +73 -0
- package/build/tp.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ It acts as a **bridge between LLM agents and the Targetprocess API**, providing:
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
|
-
- Create
|
|
16
|
-
-
|
|
15
|
+
- Create standalone bugs or bugs linked to a user story/bug card
|
|
16
|
+
- Retrieve TP entities: bugs, user stories, features, releases
|
|
17
17
|
|
|
18
18
|
- **LLM-Friendly Tools**
|
|
19
19
|
- Designed for Claude MCP AI agents
|
|
@@ -50,8 +50,11 @@ Cards — Read
|
|
|
50
50
|
|
|
51
51
|
Cards — Write
|
|
52
52
|
- `add_comment` — Post a comment to any card (id, comment)
|
|
53
|
-
- `create_bug` — Create a
|
|
53
|
+
- `create_bug` — Create a standalone bug (title, bugContent, optional origin)
|
|
54
|
+
- `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)
|
|
54
55
|
- `create_test_plan` — Create a test plan linked to a user story (title, userStoryId)
|
|
56
|
+
|
|
57
|
+
> `origin` accepted values: `Production - Customer`, `Production - Internal`, `Pre-Release - Customer`, `Pre-Release - Internal`, `Regression - Dev01`, `Regression - Team Env`, `Manual QA` *(default)*, `Developer Raised`, `Operations`
|
|
55
58
|
---
|
|
56
59
|
|
|
57
60
|
## Installation
|
package/build/index.js
CHANGED
|
@@ -724,6 +724,79 @@ server.registerTool('create_test_plan', {
|
|
|
724
724
|
}],
|
|
725
725
|
};
|
|
726
726
|
});
|
|
727
|
+
server.registerTool('get_not_covered_user_stories_in_feature', {
|
|
728
|
+
title: 'Get not covered user stories in feature',
|
|
729
|
+
description: 'Get user stories for a TP feature by its ID that are not covered by any tests',
|
|
730
|
+
inputSchema: {
|
|
731
|
+
id: z.string()
|
|
732
|
+
.min(5)
|
|
733
|
+
.max(6)
|
|
734
|
+
.describe('TP feature ID (e.g. 145636)'),
|
|
735
|
+
},
|
|
736
|
+
}, async ({ id }) => {
|
|
737
|
+
const response = await tp.getUserStoriesByFeatureId(id);
|
|
738
|
+
if (!response) {
|
|
739
|
+
return {
|
|
740
|
+
content: [{
|
|
741
|
+
type: 'text',
|
|
742
|
+
text: `Failed to get user stories for feature id: ${id}`
|
|
743
|
+
}],
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
const userStoriesIds = response.items || [];
|
|
747
|
+
if (userStoriesIds.length === 0) {
|
|
748
|
+
return {
|
|
749
|
+
content: [{
|
|
750
|
+
type: 'text',
|
|
751
|
+
text: `No user stories found in outer items for feature id: ${id}`,
|
|
752
|
+
}],
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
const userStoriesPromise = userStoriesIds.map((id) => tp.getUserStory(id));
|
|
756
|
+
let userStoriesResults = [];
|
|
757
|
+
try {
|
|
758
|
+
userStoriesResults = await Promise.all(userStoriesPromise);
|
|
759
|
+
}
|
|
760
|
+
catch (error) {
|
|
761
|
+
console.error("Error getting user stories:", error);
|
|
762
|
+
return {
|
|
763
|
+
content: [{
|
|
764
|
+
type: 'text',
|
|
765
|
+
text: `Failed to get user stories for feature id: ${id}`,
|
|
766
|
+
}],
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
let userStories = [];
|
|
770
|
+
for (const userStory of userStoriesResults) {
|
|
771
|
+
const userStoryId = userStory.Id;
|
|
772
|
+
const feature = userStory.Feature;
|
|
773
|
+
const featureId = feature.Id;
|
|
774
|
+
const featureName = feature.Name;
|
|
775
|
+
const covered = userStory.CustomFields.find((field) => field.Name === "Test Automation")?.Value === "Done";
|
|
776
|
+
userStories.push({
|
|
777
|
+
id: userStoryId,
|
|
778
|
+
name: userStory.Name,
|
|
779
|
+
description: userStory.Description,
|
|
780
|
+
featureId,
|
|
781
|
+
featureName,
|
|
782
|
+
covered,
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
if (userStories.length === 0) {
|
|
786
|
+
return {
|
|
787
|
+
content: [{
|
|
788
|
+
type: 'text',
|
|
789
|
+
text: `No user stories unable to convert to TP card found for feature id: ${id}`,
|
|
790
|
+
}],
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
return {
|
|
794
|
+
content: [{
|
|
795
|
+
type: 'text',
|
|
796
|
+
text: JSON.stringify(userStories)
|
|
797
|
+
}],
|
|
798
|
+
};
|
|
799
|
+
});
|
|
727
800
|
server.registerTool('get_feature_user_stories', {
|
|
728
801
|
title: 'Get feature user stories',
|
|
729
802
|
description: 'Get user stories for a TP feature by its ID',
|
package/build/tp.js
CHANGED
|
@@ -332,6 +332,17 @@ export class TpClient {
|
|
|
332
332
|
apiVersion: this.v2
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
|
+
async getUserStoriesByFeatureId(featureId) {
|
|
336
|
+
return this.get({
|
|
337
|
+
pathParam: { "userstories": '' },
|
|
338
|
+
param: {
|
|
339
|
+
"format": "json",
|
|
340
|
+
"where": `(Feature.Id==${featureId})`,
|
|
341
|
+
"select": `{id}`,
|
|
342
|
+
},
|
|
343
|
+
apiVersion: this.v2
|
|
344
|
+
});
|
|
345
|
+
}
|
|
335
346
|
async getContext() {
|
|
336
347
|
return this.get({
|
|
337
348
|
pathParam: { "Context": '' },
|