targetprocess-mcp-server 2.6.7-a → 2.6.8
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 +29 -1
- package/build/tp.js +13 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -477,6 +477,34 @@ server.registerTool('update_user_story_state', {
|
|
|
477
477
|
.describe('Team Assignment ID, resolve it via "get_user_story_content" first'),
|
|
478
478
|
},
|
|
479
479
|
}, async ({ id, teamId, teamAssignmentId, entityStateId }) => handleUpdateUserStorySubState(tp, { id, teamId, teamAssignmentId, entityStateId }));
|
|
480
|
+
server.registerTool('set_business_value', {
|
|
481
|
+
title: 'Set Business Value on a TP card',
|
|
482
|
+
description: `Set the Business Value (Priority) on a Targetprocess User Story, Feature, or Epic.
|
|
483
|
+
Business Value in the TP UI maps to the Priority field in the API.
|
|
484
|
+
CRITICAL WORKFLOW: Call "get_priorities" first to retrieve the list of valid priority IDs and their names for this instance before calling this tool — do not guess priority IDs.`,
|
|
485
|
+
inputSchema: {
|
|
486
|
+
id: z.string()
|
|
487
|
+
.describe('ID of the card to update (e.g. "151282")'),
|
|
488
|
+
entityType: z.enum(['UserStories', 'Features', 'Epics'])
|
|
489
|
+
.describe('Entity type of the card'),
|
|
490
|
+
priorityId: z.string()
|
|
491
|
+
.describe('Priority ID — resolve via "get_priorities" first'),
|
|
492
|
+
},
|
|
493
|
+
}, async ({ id, entityType, priorityId }) => {
|
|
494
|
+
const response = await tp.setBusinessValue({ id, entityType, priorityId });
|
|
495
|
+
if (!response) {
|
|
496
|
+
return { content: [{ type: 'text', text: `Failed to set business value on ${entityType} ${id}` }] };
|
|
497
|
+
}
|
|
498
|
+
return { content: [{ type: 'text', text: JSON.stringify(response) }] };
|
|
499
|
+
});
|
|
500
|
+
server.registerTool('get_priorities', {
|
|
501
|
+
title: 'Get available Business Value / Priority options',
|
|
502
|
+
description: `Returns the list of Priority options available in this Targetprocess instance. Use this before calling "set_business_value" to resolve a priority name (e.g. "Must Have", "Normal", "10") to its ID.`,
|
|
503
|
+
inputSchema: {},
|
|
504
|
+
}, async () => {
|
|
505
|
+
const response = await tp.getPriorities();
|
|
506
|
+
return { content: [{ type: 'text', text: JSON.stringify(response) }] };
|
|
507
|
+
});
|
|
480
508
|
server.registerTool('update_user_story', {
|
|
481
509
|
title: 'Update a user story card',
|
|
482
510
|
description: `Update a user story card with data provided from user input.
|
|
@@ -826,7 +854,7 @@ server.registerTool('create_formatted_feature', {
|
|
|
826
854
|
}, async ({ title, header, definitions, scope, nonFunctionalRequirements, crossCuttingScenarios, childStories, openQuestions, references, notes, epicId, releaseId, projectId, teamId }) => handleCreateFormattedFeature(tp, { title, header, definitions, scope, nonFunctionalRequirements, crossCuttingScenarios, childStories, openQuestions, references, notes, epicId, releaseId, projectId, teamId }));
|
|
827
855
|
server.registerTool('create_feature', {
|
|
828
856
|
title: 'Create a new feature',
|
|
829
|
-
description: `
|
|
857
|
+
description: `DEPRECATED — use "create_formatted_feature" instead for all new features. Only call this tool when you have a fully pre-written HTML description and the user has explicitly opted out of the structured template.`,
|
|
830
858
|
inputSchema: {
|
|
831
859
|
title: z.string()
|
|
832
860
|
.describe('Feature title'),
|
package/build/tp.js
CHANGED
|
@@ -260,6 +260,13 @@ export class TpClient {
|
|
|
260
260
|
param: { "format": "json" },
|
|
261
261
|
}, userStory);
|
|
262
262
|
}
|
|
263
|
+
async setBusinessValue({ id, entityType, priorityId }) {
|
|
264
|
+
const entity = { "Id": id, "Priority": { "Id": priorityId } };
|
|
265
|
+
return this.post({
|
|
266
|
+
pathParam: [entityType, id],
|
|
267
|
+
param: { "format": "json" },
|
|
268
|
+
}, entity);
|
|
269
|
+
}
|
|
263
270
|
async updateBug({ id, title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }) {
|
|
264
271
|
const bug = { "Id": id };
|
|
265
272
|
if (title)
|
|
@@ -884,6 +891,12 @@ export class TpClient {
|
|
|
884
891
|
param: { "format": "json" },
|
|
885
892
|
});
|
|
886
893
|
}
|
|
894
|
+
async getPriorities() {
|
|
895
|
+
return this.get({
|
|
896
|
+
pathParam: ["Priorities"],
|
|
897
|
+
param: { "format": "json", "take": "200" },
|
|
898
|
+
});
|
|
899
|
+
}
|
|
887
900
|
async getProcessWorkflows({ processId }) {
|
|
888
901
|
return this.get({
|
|
889
902
|
pathParam: ["Process"],
|