targetprocess-mcp-server 1.0.7 → 1.0.9

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 CHANGED
@@ -573,10 +573,13 @@ server.registerTool('create_bug', {
573
573
  inputSchema: {
574
574
  title: z.string()
575
575
  .describe('Bug card title that summarizes the problem in concise, descriptive, and actionable manner, enabling a developer to understand the issue without opening the report'),
576
- id: z.string()
577
- .min(5)
578
- .max(6)
579
- .describe(`Usually user story id or bug ID (e.g. 145789)`),
576
+ card: z.object({
577
+ id: z.string()
578
+ .min(5)
579
+ .max(6)
580
+ .describe(`Usually user story id or bug ID (e.g. 145789)`),
581
+ type: z.enum(["UserStory", "Bug"])
582
+ }),
580
583
  bugContent: z.string()
581
584
  .describe(`Comment content to add, explain what happened in detail.
582
585
  Include expected behaviour and what actually occurred.
@@ -584,13 +587,13 @@ server.registerTool('create_bug', {
584
587
  Clearly outline the actions needed to trigger the bug.
585
588
  Number each step so anyone can follow them easily`),
586
589
  },
587
- }, async ({ title, id, bugContent }) => {
588
- const bugResponse = await tp.createBugBasedOnCardId(title, id, bugContent);
590
+ }, async ({ title, card, bugContent }) => {
591
+ const bugResponse = await tp.createBug({ title, card, bugContent });
589
592
  if (!bugResponse) {
590
593
  return {
591
594
  content: [{
592
595
  type: 'text',
593
- text: `Failed to create comment "${title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
596
+ text: `Failed to create bug "${title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
594
597
  }]
595
598
  };
596
599
  }
package/build/tp.js CHANGED
@@ -94,7 +94,7 @@ export class TpClient {
94
94
  });
95
95
  return response;
96
96
  }
97
- async createBug(title, bugContent) {
97
+ async createBug({ title, card, bugContent }) {
98
98
  const bug = {
99
99
  "Name": title,
100
100
  "Project": {
@@ -112,12 +112,17 @@ export class TpClient {
112
112
  }],
113
113
  "Description": bugContent,
114
114
  };
115
+ if (card.type === "UserStory") {
116
+ bug["UserStory"] = {
117
+ "Id": card.id
118
+ };
119
+ }
115
120
  return this.post({
116
121
  pathParam: { "bugs": '' },
117
122
  param: { "format": "json" },
118
123
  }, bug);
119
124
  }
120
- async createBugBasedOnCardId(title, userStoryId, bugContent) {
125
+ async createBugBasedOnUserStory(title, userStoryId, bugContent) {
121
126
  const bug = {
122
127
  "Name": title,
123
128
  "Project": {
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "1.0.7",
28
+ "version": "1.0.9",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [