targetprocess-mcp-server 2.2.7-a → 2.2.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/README.md CHANGED
@@ -45,6 +45,9 @@ Features
45
45
  - `get_feature_user_stories` — Get all user stories for a feature by its ID (id)
46
46
  - `get_not_covered_user_stories_in_feature` — Get user stories in a feature not yet covered by tests, includes `covered` field based on "Test Automation" custom field (id)
47
47
 
48
+ User Stories
49
+ - `get_user_story_bugs` — Get all bugs linked to a user story by its ID (id)
50
+
48
51
  Cards — Read
49
52
  - `get_card_current_status` — Get EntityState, TeamState, and assigned teams for a card (id, optional resourceType: UserStory | Bug | Feature, default: UserStory)
50
53
  - `get_bug_content` — Fetch full content of a bug by ID (id)
package/build/index.js CHANGED
@@ -1058,19 +1058,45 @@ server.registerTool('get_feature_user_stories', {
1058
1058
  }],
1059
1059
  };
1060
1060
  }
1061
- const featureItems = items[0].items || [];
1061
+ return {
1062
+ content: [{
1063
+ type: 'text',
1064
+ text: JSON.stringify(items)
1065
+ }],
1066
+ };
1067
+ });
1068
+ server.registerTool('get_user_story_bugs', {
1069
+ title: 'Get user story bugs',
1070
+ description: 'Get bugs linked to a TP user story by its ID',
1071
+ inputSchema: {
1072
+ id: z.string()
1073
+ .min(5)
1074
+ .max(6)
1075
+ .describe('TP user story ID (e.g. 145789)'),
1076
+ },
1077
+ }, async ({ id }) => {
1078
+ const response = await tp.getUserStoryBugs(id);
1079
+ if (!response) {
1080
+ return {
1081
+ content: [{
1082
+ type: 'text',
1083
+ text: `Failed to get bugs for user story id: ${id}`
1084
+ }],
1085
+ };
1086
+ }
1087
+ const items = response.items || [];
1062
1088
  if (items.length === 0) {
1063
1089
  return {
1064
1090
  content: [{
1065
1091
  type: 'text',
1066
- text: `No user stories found for feature id: ${id}`,
1092
+ text: `No bugs found for user story id: ${id}`,
1067
1093
  }],
1068
1094
  };
1069
1095
  }
1070
1096
  return {
1071
1097
  content: [{
1072
1098
  type: 'text',
1073
- text: JSON.stringify(featureItems)
1099
+ text: JSON.stringify(items)
1074
1100
  }],
1075
1101
  };
1076
1102
  });
package/build/tp.js CHANGED
@@ -45,7 +45,6 @@ export class TpClient {
45
45
  async get(params) {
46
46
  params.param["access_token"] = this.token;
47
47
  let _url = this.params(params);
48
- console.error(JSON.stringify({ "TP_URL": _url }, null, 2));
49
48
  try {
50
49
  const response = await fetch(_url, {
51
50
  method: "GET",
@@ -457,6 +456,17 @@ export class TpClient {
457
456
  apiVersion: this.v2
458
457
  });
459
458
  }
459
+ async getUserStoryBugs(userStoryId) {
460
+ return this.get({
461
+ pathParam: ["userstories"],
462
+ param: {
463
+ "format": "json",
464
+ "where": `(id==${userStoryId})`,
465
+ "select": `{bugs}`,
466
+ },
467
+ apiVersion: this.v2
468
+ });
469
+ }
460
470
  async getUserStoriesIdsByFeatureId(featureId) {
461
471
  return this.get({
462
472
  pathParam: ["userstories"],
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "engines": {
26
26
  "node": ">=20.x"
27
27
  },
28
- "version": "2.2.7a",
28
+ "version": "2.2.8",
29
29
  "description": "MCP server for Tartget Process",
30
30
  "main": "build/index.js",
31
31
  "keywords": [