targetprocess-mcp-server 2.2.1 → 2.2.2
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 +3 -0
- package/build/index.js +43 -0
- package/build/tp.js +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,9 @@ Cards — Write
|
|
|
65
65
|
- `create_user_story` — Create a new user story (title, optional description, optional featureId, optional releaseId, optional projectId, optional teamId)
|
|
66
66
|
> [!NOTE]
|
|
67
67
|
> `projectId` and `teamId` are optional — fall back to `TP_PROJECT_ID` and `TP_TEAM_ID` from config
|
|
68
|
+
- `create_feature` — Create a new feature (title, optional description, optional epicId, optional releaseId, optional projectId, optional teamId)
|
|
69
|
+
> [!NOTE]
|
|
70
|
+
> `projectId` and `teamId` are optional — fall back to `TP_PROJECT_ID` and `TP_TEAM_ID` from config
|
|
68
71
|
- `create_test_plan` — Create a test plan linked to a UserStory, Bug, or Feature (title, resourceId, optional resourceType, optional description/startDate/endDate)
|
|
69
72
|
> [!NOTE]
|
|
70
73
|
> requires `TP_PROJECT_ID`,
|
package/build/index.js
CHANGED
|
@@ -751,6 +751,49 @@ server.registerTool('create_user_story', {
|
|
|
751
751
|
}],
|
|
752
752
|
};
|
|
753
753
|
});
|
|
754
|
+
server.registerTool('create_feature', {
|
|
755
|
+
title: 'Create a new feature',
|
|
756
|
+
description: `Create a new Feature in Targetprocess.`,
|
|
757
|
+
inputSchema: {
|
|
758
|
+
title: z.string()
|
|
759
|
+
.describe('Feature title'),
|
|
760
|
+
description: z.string()
|
|
761
|
+
.optional()
|
|
762
|
+
.describe('Optional feature description (when provided, format as HTML)'),
|
|
763
|
+
epicId: z.string()
|
|
764
|
+
.min(5)
|
|
765
|
+
.max(6)
|
|
766
|
+
.optional()
|
|
767
|
+
.describe('Optional Epic ID to link this feature to (e.g. 145636)'),
|
|
768
|
+
releaseId: z.string()
|
|
769
|
+
.min(5)
|
|
770
|
+
.max(6)
|
|
771
|
+
.optional()
|
|
772
|
+
.describe('Optional Release ID to link this feature to (e.g. 145200)'),
|
|
773
|
+
projectId: z.string()
|
|
774
|
+
.optional()
|
|
775
|
+
.describe('Optional Project ID — defaults to TP_PROJECT_ID from config'),
|
|
776
|
+
teamId: z.string()
|
|
777
|
+
.optional()
|
|
778
|
+
.describe('Optional Team ID — defaults to TP_TEAM_ID from config'),
|
|
779
|
+
},
|
|
780
|
+
}, async ({ title, description, epicId, releaseId, projectId, teamId }) => {
|
|
781
|
+
const featureResponse = await tp.createFeature({ title, description, epicId, releaseId, projectId, teamId });
|
|
782
|
+
if (!featureResponse) {
|
|
783
|
+
return {
|
|
784
|
+
content: [{
|
|
785
|
+
type: 'text',
|
|
786
|
+
text: `Failed to create feature "${title}"\n JSON: ${JSON.stringify(featureResponse, null, 2)}`
|
|
787
|
+
}]
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
return {
|
|
791
|
+
content: [{
|
|
792
|
+
type: 'text',
|
|
793
|
+
text: JSON.stringify(featureResponse)
|
|
794
|
+
}],
|
|
795
|
+
};
|
|
796
|
+
});
|
|
754
797
|
server.registerTool('create_test_plan', {
|
|
755
798
|
title: 'Create a new test plan linked to a TP card',
|
|
756
799
|
description: `Create a new test plan linked to a UserStory, Bug, or Feature. Name and Project are required by the API; Description, StartDate, and EndDate are optional.`,
|
package/build/tp.js
CHANGED
|
@@ -170,6 +170,23 @@ export class TpClient {
|
|
|
170
170
|
param: { "format": "json" },
|
|
171
171
|
}, userStory);
|
|
172
172
|
}
|
|
173
|
+
async createFeature({ title, description, epicId, releaseId, projectId, teamId }) {
|
|
174
|
+
const feature = {
|
|
175
|
+
"Name": title,
|
|
176
|
+
"Project": { "Id": projectId || config.tp.projectId },
|
|
177
|
+
"assignedTeams": [{ "team": { "id": teamId || config.tp.teamId } }],
|
|
178
|
+
};
|
|
179
|
+
if (description)
|
|
180
|
+
feature["Description"] = description;
|
|
181
|
+
if (epicId)
|
|
182
|
+
feature["Epic"] = { "Id": epicId };
|
|
183
|
+
if (releaseId)
|
|
184
|
+
feature["Release"] = { "Id": releaseId };
|
|
185
|
+
return this.post({
|
|
186
|
+
pathParam: { "Features": '' },
|
|
187
|
+
param: { "format": "json" },
|
|
188
|
+
}, feature);
|
|
189
|
+
}
|
|
173
190
|
async createBugBasedOnUserStory(title, userStoryId, bugContent) {
|
|
174
191
|
const bug = {
|
|
175
192
|
"Name": title,
|