targetprocess-mcp-server 1.0.7 → 1.0.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 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,12 +94,15 @@ 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": {
101
101
  "Id": 59901
102
102
  },
103
+ [card.type]: {
104
+ "Id": card.id
105
+ },
103
106
  "customFields": [{
104
107
  "name": "Origin",
105
108
  "type": "DropDown",
@@ -117,7 +120,7 @@ export class TpClient {
117
120
  param: { "format": "json" },
118
121
  }, bug);
119
122
  }
120
- async createBugBasedOnCardId(title, userStoryId, bugContent) {
123
+ async createBugBasedOnUserStory(title, userStoryId, bugContent) {
121
124
  const bug = {
122
125
  "Name": title,
123
126
  "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.8",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [