targetprocess-mcp-server 2.2.9-b → 2.2.11
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 +10 -0
- package/build/index.js +17 -16
- package/build/tp.js +16 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,10 @@ Features
|
|
|
48
48
|
User Stories
|
|
49
49
|
- `get_user_story_bugs` — Get all bugs linked to a user story by its ID (id)
|
|
50
50
|
|
|
51
|
+
Tasks
|
|
52
|
+
- `get_in_progress_tasks_and_bugs` — Get all Tasks and Bugs currently in "In Progress" state assigned to a given user (userId)
|
|
53
|
+
- `create_task` — Create a new task linked to a user story (title, userStoryId, optional description)
|
|
54
|
+
|
|
51
55
|
Cards — Read
|
|
52
56
|
- `get_card_current_status` — Get EntityState, TeamState, and assigned teams for a card (id, optional resourceType: UserStory | Bug | Feature, default: UserStory)
|
|
53
57
|
- `get_bug_content` — Fetch full content of a bug by ID (id)
|
|
@@ -100,6 +104,12 @@ Teams
|
|
|
100
104
|
User
|
|
101
105
|
- `get_logged_in_user` — Get the currently logged-in user's info (no params needed)
|
|
102
106
|
|
|
107
|
+
Developer Tools
|
|
108
|
+
- `get_commit_message` — Returns a formatted commit message string for a task or bug ID (id, type: task | bug)
|
|
109
|
+
> Format for task on a user story: `F#<featureId> US#<userStoryId> T#<taskId> <title>`
|
|
110
|
+
> Format for bug on a user story: `F#<featureId> US#<userStoryId> B#<bugId> <title>`
|
|
111
|
+
> Format for standalone bug: `B#<bugId> <title>`
|
|
112
|
+
|
|
103
113
|
|
|
104
114
|
---
|
|
105
115
|
|
package/build/index.js
CHANGED
|
@@ -599,11 +599,11 @@ server.registerTool('get_bug_comments', {
|
|
|
599
599
|
server.registerTool('create_bug_based_on_card', {
|
|
600
600
|
title: 'Create a new bug card based on provided card id',
|
|
601
601
|
description: `Create a new bug card based on provided card id that summarizes the problem in concise, descriptive manner answering questions What? Where? When?, and content explaining what happened in detail.
|
|
602
|
-
NOTE: this tool requires a user story or
|
|
602
|
+
NOTE: this tool requires a user story, bug, or feature card as a reference (i.e. card ID).
|
|
603
603
|
CRITICAL WORKFLOW: Before calling this tool, you MUST follow these steps:
|
|
604
|
-
1) IF you already have user story or
|
|
605
|
-
2) ELSE call "get_user_story_content" tool
|
|
606
|
-
3) format the new bug inside html <div> tags with Environment, Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>);
|
|
604
|
+
1) IF you already have user story, bug, or feature card content, proceed to step 3 skipping step 2;
|
|
605
|
+
2) ELSE call "get_user_story_content" tool, "get_bug_content" tool, or fetch the feature to get card content;
|
|
606
|
+
3) format the new bug inside html <div> tags with Environment (describes where bug was found, dev, feature, review or uat Environment), Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>);
|
|
607
607
|
4) IF the user specified a team by name (not ID), call "get_teams" to find the matching team and use its ID as teamId;
|
|
608
608
|
5) IF the user specified a project by name (not ID), call "get_projects" to find the matching project and use its ID as projectId;
|
|
609
609
|
6) add a comment to the card with created bug Id and its Title`,
|
|
@@ -614,8 +614,8 @@ server.registerTool('create_bug_based_on_card', {
|
|
|
614
614
|
id: z.string()
|
|
615
615
|
.min(5)
|
|
616
616
|
.max(6)
|
|
617
|
-
.describe(`Usually user story id or
|
|
618
|
-
type: z.enum(["UserStory", "Bug"])
|
|
617
|
+
.describe(`Usually user story id, bug ID, or feature ID (e.g. 145789)`),
|
|
618
|
+
type: z.enum(["UserStory", "Bug", "Feature"])
|
|
619
619
|
}),
|
|
620
620
|
bugContent: z.string()
|
|
621
621
|
.describe(`Comment content to add, explain what happened in detail.
|
|
@@ -636,7 +636,7 @@ server.registerTool('create_bug_based_on_card', {
|
|
|
636
636
|
])
|
|
637
637
|
.default("Manual QA")
|
|
638
638
|
.optional()
|
|
639
|
-
.describe('Where the bug was found, defaults to "Manual QA"'),
|
|
639
|
+
.describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
|
|
640
640
|
projectId: z.string()
|
|
641
641
|
.optional()
|
|
642
642
|
.describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
|
|
@@ -771,7 +771,7 @@ server.registerTool('create_bug', {
|
|
|
771
771
|
description: `Create a new bug card that summarizes the problem in concise, descriptive manner answering questions "What? Where? When?" and content explaining what happened in detail.
|
|
772
772
|
NOTE: this tool does not require a user story or bug card reference.
|
|
773
773
|
CRITICAL WORKFLOW: Before calling this tool, you MUST follow these steps:
|
|
774
|
-
1) format the new bug inside html <div> tags with Environment, Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>, step to reproduce should be wrapped in <ol>);
|
|
774
|
+
1) format the new bug inside html <div> tags with Environment(describes where bug was found, dev, feature, review or uat Environment), Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>, step to reproduce should be wrapped in <ol>);
|
|
775
775
|
2) IF the user specified a team by name (not ID), call "get_teams" to find the matching team and use its ID as teamId;
|
|
776
776
|
3) IF the user specified a project by name (not ID), call "get_projects" to find the matching project and use its ID as projectId;`,
|
|
777
777
|
inputSchema: {
|
|
@@ -792,7 +792,7 @@ server.registerTool('create_bug', {
|
|
|
792
792
|
])
|
|
793
793
|
.default("Manual QA")
|
|
794
794
|
.optional()
|
|
795
|
-
.describe('Where the bug was found, defaults to "Manual QA"'),
|
|
795
|
+
.describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
|
|
796
796
|
projectId: z.string()
|
|
797
797
|
.optional()
|
|
798
798
|
.describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
|
|
@@ -1481,9 +1481,9 @@ server.registerTool('get_bug_workflows', {
|
|
|
1481
1481
|
});
|
|
1482
1482
|
server.registerTool('get_user_story_workflows', {
|
|
1483
1483
|
title: 'Get User Story workflows',
|
|
1484
|
-
description: 'Get all Targetprocess user story workflows',
|
|
1484
|
+
description: 'Get all Targetprocess user story workflows, with sub-states',
|
|
1485
1485
|
}, async ({}) => {
|
|
1486
|
-
const response = await tp.
|
|
1486
|
+
const response = await tp.getUserStoryWorkflowsWithSubStates();
|
|
1487
1487
|
if (!response) {
|
|
1488
1488
|
return {
|
|
1489
1489
|
content: [{
|
|
@@ -1501,12 +1501,13 @@ server.registerTool('get_user_story_workflows', {
|
|
|
1501
1501
|
}],
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
-
const
|
|
1504
|
+
const userStoryWorkflows = items.filter((w) => w.entityType.name === "UserStory");
|
|
1505
|
+
const workflows = userStoryWorkflows.map((w) => ({
|
|
1505
1506
|
id: w.id,
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1507
|
+
processId: w.workflow.process.id,
|
|
1508
|
+
entityType: w.entityType.name,
|
|
1509
|
+
entityState: w.name,
|
|
1510
|
+
entitySubStates: w.subEntityStates.map((es) => ({
|
|
1510
1511
|
id: es.id,
|
|
1511
1512
|
name: es.name,
|
|
1512
1513
|
})),
|
package/build/tp.js
CHANGED
|
@@ -120,9 +120,10 @@ export class TpClient {
|
|
|
120
120
|
"Description": bugContent,
|
|
121
121
|
};
|
|
122
122
|
if (card.type === "UserStory") {
|
|
123
|
-
bug["UserStory"] = {
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
bug["UserStory"] = { "Id": card.id };
|
|
124
|
+
}
|
|
125
|
+
else if (card.type === "Feature") {
|
|
126
|
+
bug["Feature"] = { "Id": card.id };
|
|
126
127
|
}
|
|
127
128
|
return this.post({
|
|
128
129
|
pathParam: ["bugs"],
|
|
@@ -561,6 +562,18 @@ export class TpClient {
|
|
|
561
562
|
apiVersion: this.v2
|
|
562
563
|
});
|
|
563
564
|
}
|
|
565
|
+
async getUserStoryWorkflowsWithSubStates() {
|
|
566
|
+
return this.get({
|
|
567
|
+
pathParam: ["EntityState"],
|
|
568
|
+
param: {
|
|
569
|
+
"format": "json",
|
|
570
|
+
"select": `{id,name,isInitial,isFinal,isDefaultFinal,isPlanned,workflow:{workflow.id,process:{workflow.process.id}},entityType:{entityType.name},subEntityStates:subEntityStates.Select({id,name,entityType:{entityType.name},isInitial,isFinal,isDefaultFinal,isPlanned})}`,
|
|
571
|
+
"where": `(parentEntityState==null and workflow.process.id in [${config.tp.processId}])`,
|
|
572
|
+
"take": "1000",
|
|
573
|
+
},
|
|
574
|
+
apiVersion: this.v2
|
|
575
|
+
});
|
|
576
|
+
}
|
|
564
577
|
async getBugWorkflows() {
|
|
565
578
|
return this.get({
|
|
566
579
|
pathParam: ["workflow"],
|