targetprocess-mcp-server 2.6.7-a → 2.6.7

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.
@@ -14,7 +14,6 @@ export async function handleGetBugContent(tp, id) {
14
14
  id: bug.Id,
15
15
  description: '',
16
16
  origin: '',
17
- release: bug.Release ? { id: bug.Release.Id, name: bug.Release.Name } : null,
18
17
  };
19
18
  try {
20
19
  const dom = new JSDOM(`<html><body><div id="content">${bug.Description}</div></body></html>`);
package/build/index.js CHANGED
@@ -25,7 +25,6 @@ import { handleAddComment } from "./handlers/add_comment.js";
25
25
  import { handleGetUserStoryComments } from "./handlers/get_user_story_comments.js";
26
26
  import { handleGetBugComments } from "./handlers/get_bug_comments.js";
27
27
  import { handleCreateBug } from "./handlers/create_bug.js";
28
- import { handleCreateBugBasedOnCard } from "./handlers/create_bug_based_on_card.js";
29
28
  import { handleCreateUserStory } from "./handlers/create_user_story.js";
30
29
  import { handleCreateFormattedUserStory } from "./handlers/create_formatted_user_story.js";
31
30
  import { handleCreateFormattedFeature } from "./handlers/create_formatted_feature.js";
@@ -355,8 +354,7 @@ server.registerTool('create_bug_based_on_card', {
355
354
  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>);
356
355
  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;
357
356
  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;
358
- 6) IF the user specified a release by name (not ID), call "get_current_releases" to find the matching release and use its ID as releaseId;
359
- 7) add a comment to the card with created bug Id and its Title`,
357
+ 6) add a comment to the card with created bug Id and its Title`,
360
358
  inputSchema: {
361
359
  title: z.string()
362
360
  .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'),
@@ -386,11 +384,6 @@ server.registerTool('create_bug_based_on_card', {
386
384
  ])
387
385
  .optional()
388
386
  .describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
389
- releaseId: z.string()
390
- .min(5)
391
- .max(9)
392
- .optional()
393
- .describe('Optional Release ID to assign this bug to — if user gave a release name, resolve it via "get_current_releases" first'),
394
387
  projectId: z.string()
395
388
  .optional()
396
389
  .describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
@@ -398,7 +391,23 @@ server.registerTool('create_bug_based_on_card', {
398
391
  .optional()
399
392
  .describe('Optional Team ID — if user gave a team name, resolve it via "get_teams" first; defaults to TP_TEAM_ID from config'),
400
393
  },
401
- }, async ({ title, card, bugContent, origin, releaseId, projectId, teamId }) => handleCreateBugBasedOnCard(tp, { title, card, bugContent, origin, releaseId, projectId, teamId }));
394
+ }, async ({ title, card, bugContent, origin, projectId, teamId }) => {
395
+ const bugResponse = await tp.createBug({ title, card, bugContent, origin, projectId, teamId });
396
+ if (!bugResponse) {
397
+ return {
398
+ content: [{
399
+ type: 'text',
400
+ text: `Failed to create bug "${title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
401
+ }]
402
+ };
403
+ }
404
+ return {
405
+ content: [{
406
+ type: 'text',
407
+ text: JSON.stringify(bugResponse)
408
+ }],
409
+ };
410
+ });
402
411
  server.registerTool('update_bug', {
403
412
  title: 'Update a bug card',
404
413
  description: `Update a bug card with data proded from user input.
@@ -407,8 +416,7 @@ server.registerTool('update_bug', {
407
416
  1) IF the user specified a team by name (not ID), call "get_teams" to find the matching team and use its ID as teamId;
408
417
  2) IF the user specified a project by name (not ID), call "get_projects" to find the matching project and use its ID as projectId;
409
418
  3) IF the user specified a state by name (not ID), call "get_bug_workflows" to find the matching state and use its ID as entityStateId;
410
- 4) IF the user specified a sprint/iteration by name, call "get_team_iterations" to find the matching iteration and use its ID as teamIterationId;
411
- 5) IF the user specified a release by name (not ID), call "get_current_releases" to find the matching release and use its ID as releaseId;`,
419
+ 4) IF the user specified a sprint/iteration by name, call "get_team_iterations" to find the matching iteration and use its ID as teamIterationId;`,
412
420
  inputSchema: {
413
421
  id: z.string()
414
422
  .min(5)
@@ -433,11 +441,6 @@ server.registerTool('update_bug', {
433
441
  ])
434
442
  .optional()
435
443
  .describe('Where the bug was found, defaults to "Manual QA"'),
436
- releaseId: z.string()
437
- .min(5)
438
- .max(9)
439
- .optional()
440
- .describe('Optional Release ID to assign this bug to — if user gave a release name, resolve it via "get_current_releases" first'),
441
444
  projectId: z.string()
442
445
  .optional()
443
446
  .describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
@@ -454,7 +457,7 @@ server.registerTool('update_bug', {
454
457
  .optional()
455
458
  .describe('Optional Team Iteration (sprint) ID — resolve it via "get_team_iterations" first'),
456
459
  },
457
- }, async ({ id, title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }) => handleUpdateBug(tp, { id, title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }));
460
+ }, async ({ id, title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }) => handleUpdateBug(tp, { id, title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }));
458
461
  server.registerTool('update_user_story_state', {
459
462
  title: 'Update a user story card sub state',
460
463
  description: `Update a user story card sub state with data provided from user input.
@@ -541,8 +544,7 @@ server.registerTool('create_bug', {
541
544
  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>);
542
545
  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;
543
546
  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;
544
- 4) IF the user specified a sprint/iteration by name, call "get_team_iterations" to find the matching iteration and use its ID as teamIterationId;
545
- 5) IF the user specified a release by name (not ID), call "get_current_releases" to find the matching release and use its ID as releaseId;`,
547
+ 4) IF the user specified a sprint/iteration by name, call "get_team_iterations" to find the matching iteration and use its ID as teamIterationId;`,
546
548
  inputSchema: {
547
549
  title: z.string()
548
550
  .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'),
@@ -561,11 +563,6 @@ server.registerTool('create_bug', {
561
563
  ])
562
564
  .optional()
563
565
  .describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
564
- releaseId: z.string()
565
- .min(5)
566
- .max(9)
567
- .optional()
568
- .describe('Optional Release ID to assign this bug to — if user gave a release name, resolve it via "get_current_releases" first'),
569
566
  projectId: z.string()
570
567
  .optional()
571
568
  .describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
@@ -582,7 +579,7 @@ server.registerTool('create_bug', {
582
579
  .optional()
583
580
  .describe('Optional Team Iteration (sprint) ID — resolve it via "get_team_iterations" first'),
584
581
  },
585
- }, async ({ title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }) => handleCreateBug(tp, { title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }));
582
+ }, async ({ title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }) => handleCreateBug(tp, { title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }));
586
583
  server.registerTool('create_user_story', {
587
584
  title: 'Create a new user story',
588
585
  description: `Create a new user story in Targetprocess.
package/build/tp.js CHANGED
@@ -186,7 +186,7 @@ export class TpClient {
186
186
  });
187
187
  return response;
188
188
  }
189
- async createBug({ title, card, bugContent, origin, releaseId, projectId, teamId }) {
189
+ async createBug({ title, card, bugContent, origin, projectId, teamId }) {
190
190
  const bug = {
191
191
  "Name": title,
192
192
  "Project": {
@@ -207,8 +207,6 @@ export class TpClient {
207
207
  "value": origin
208
208
  }];
209
209
  }
210
- if (releaseId)
211
- bug["Release"] = { "Id": releaseId };
212
210
  if (card.type === "UserStory") {
213
211
  bug["UserStory"] = { "Id": card.id };
214
212
  }
@@ -260,7 +258,7 @@ export class TpClient {
260
258
  param: { "format": "json" },
261
259
  }, userStory);
262
260
  }
263
- async updateBug({ id, title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }) {
261
+ async updateBug({ id, title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }) {
264
262
  const bug = { "Id": id };
265
263
  if (title)
266
264
  bug["Name"] = title;
@@ -272,8 +270,6 @@ export class TpClient {
272
270
  "type": "DropDown",
273
271
  "value": origin
274
272
  }];
275
- if (releaseId)
276
- bug["Release"] = { "Id": releaseId };
277
273
  if (projectId)
278
274
  bug["Project"] = { "Id": projectId };
279
275
  if (teamId)
@@ -293,7 +289,7 @@ export class TpClient {
293
289
  param: { "format": "json" },
294
290
  }, bug);
295
291
  }
296
- async createBugOnly({ title, bugContent, origin, releaseId, projectId, teamId, entityStateId, tags, teamIterationId }) {
292
+ async createBugOnly({ title, bugContent, origin, projectId, teamId, entityStateId, tags, teamIterationId }) {
297
293
  const bug = {
298
294
  "Name": title,
299
295
  "Project": {
@@ -313,8 +309,6 @@ export class TpClient {
313
309
  "value": origin
314
310
  }];
315
311
  }
316
- if (releaseId)
317
- bug["Release"] = { "Id": releaseId };
318
312
  if (entityStateId)
319
313
  bug["EntityState"] = { "Id": entityStateId };
320
314
  if (tags)
package/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "engines": {
28
28
  "node": ">=20.x"
29
29
  },
30
- "version": "2.6.7a",
30
+ "version": "2.6.7",
31
31
  "description": "MCP server for Tartget Process",
32
32
  "main": "build/index.js",
33
33
  "keywords": [
@@ -1,14 +0,0 @@
1
- export async function handleCreateBugBasedOnCard(tp, params) {
2
- const bugResponse = await tp.createBug(params);
3
- if (!bugResponse) {
4
- return {
5
- content: [{
6
- type: 'text',
7
- text: `Failed to create bug "${params.title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
8
- }],
9
- };
10
- }
11
- return {
12
- content: [{ type: 'text', text: JSON.stringify(bugResponse) }],
13
- };
14
- }