targetprocess-mcp-server 1.0.14 → 1.0.15

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
@@ -589,7 +589,7 @@ server.registerTool('get_bug_comments', {
589
589
  }],
590
590
  };
591
591
  });
592
- server.registerTool('create_bug', {
592
+ server.registerTool('create_bug_based_on_card', {
593
593
  title: 'Create a new bug card based on provided card id',
594
594
  description: `Create a new bug card based on provided card id that summarizes the problem in concise,
595
595
  descriptive manner answering questions What? Where? When?,
@@ -615,9 +615,72 @@ server.registerTool('create_bug', {
615
615
  Be specific and avoid assumptions.
616
616
  Clearly outline the actions needed to trigger the bug.
617
617
  Number each step so anyone can follow them easily`),
618
+ origin: z.enum([
619
+ "Production - Customer",
620
+ "Production - Internal",
621
+ "Pre-Release - Customer",
622
+ "Pre-Release - Internal",
623
+ "Regression - Dev01",
624
+ "Regression - Team Env",
625
+ "Manual QA",
626
+ "Developer Raised",
627
+ "Operations",
628
+ ])
629
+ .default("Manual QA")
630
+ .optional()
631
+ .describe('Where the bug was found, defaults to "Manual QA"'),
632
+ },
633
+ }, async ({ title, card, bugContent, origin }) => {
634
+ const bugResponse = await tp.createBug({ title, card, bugContent, origin });
635
+ if (!bugResponse) {
636
+ return {
637
+ content: [{
638
+ type: 'text',
639
+ text: `Failed to create bug "${title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
640
+ }]
641
+ };
642
+ }
643
+ return {
644
+ content: [{
645
+ type: 'text',
646
+ text: JSON.stringify(bugResponse)
647
+ }],
648
+ };
649
+ });
650
+ server.registerTool('create_bug', {
651
+ title: 'Create a new bug card',
652
+ description: `Create a new bug card that summarizes the problem in concise,
653
+ descriptive manner answering questions What? Where? When?,
654
+ and content explaining what happened in detail.
655
+ CRITICAL WORKFLOW: Before calling this tool, you MUST follow these steps:
656
+ 1) format the new bug inside html <div> tags with Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior;
657
+ 2) add a comment to the newly created bug with its Id and Title`,
658
+ inputSchema: {
659
+ title: z.string()
660
+ .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'),
661
+ bugContent: z.string()
662
+ .describe(`Bug description content, explain what happened in detail.
663
+ Include expected behaviour and what actually occurred.
664
+ Be specific and avoid assumptions.
665
+ Clearly outline the actions needed to trigger the bug.
666
+ Number each step so anyone can follow them easily`),
667
+ origin: z.enum([
668
+ "Production - Customer",
669
+ "Production - Internal",
670
+ "Pre-Release - Customer",
671
+ "Pre-Release - Internal",
672
+ "Regression - Dev01",
673
+ "Regression - Team Env",
674
+ "Manual QA",
675
+ "Developer Raised",
676
+ "Operations",
677
+ ])
678
+ .default("Manual QA")
679
+ .optional()
680
+ .describe('Where the bug was found, defaults to "Manual QA"'),
618
681
  },
619
- }, async ({ title, card, bugContent }) => {
620
- const bugResponse = await tp.createBug({ title, card, bugContent });
682
+ }, async ({ title, bugContent, origin }) => {
683
+ const bugResponse = await tp.createBugOnly({ title, bugContent, origin });
621
684
  if (!bugResponse) {
622
685
  return {
623
686
  content: [{
package/build/tp.js CHANGED
@@ -96,7 +96,7 @@ export class TpClient {
96
96
  });
97
97
  return response;
98
98
  }
99
- async createBug({ title, card, bugContent }) {
99
+ async createBug({ title, card, bugContent, origin = "Manual QA" }) {
100
100
  const bug = {
101
101
  "Name": title,
102
102
  "Project": {
@@ -105,7 +105,7 @@ export class TpClient {
105
105
  "customFields": [{
106
106
  "name": "Origin",
107
107
  "type": "DropDown",
108
- "value": "Manual QA"
108
+ "value": origin
109
109
  }],
110
110
  "assignedTeams": [{
111
111
  "team": {
@@ -124,6 +124,29 @@ export class TpClient {
124
124
  param: { "format": "json" },
125
125
  }, bug);
126
126
  }
127
+ async createBugOnly({ title, bugContent, origin = "Manual QA" }) {
128
+ const bug = {
129
+ "Name": title,
130
+ "Project": {
131
+ "Id": config.tp.projectId
132
+ },
133
+ "customFields": [{
134
+ "name": "Origin",
135
+ "type": "DropDown",
136
+ "value": origin
137
+ }],
138
+ "assignedTeams": [{
139
+ "team": {
140
+ "id": config.tp.teamId
141
+ }
142
+ }],
143
+ "Description": bugContent,
144
+ };
145
+ return this.post({
146
+ pathParam: { "bugs": '' },
147
+ param: { "format": "json" },
148
+ }, bug);
149
+ }
127
150
  async createBugBasedOnUserStory(title, userStoryId, bugContent) {
128
151
  const bug = {
129
152
  "Name": title,
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "1.0.14",
28
+ "version": "1.0.15",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [