targetprocess-mcp-server 2.2.4 → 2.2.5
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 +6 -2
- package/build/config.js +3 -0
- package/build/index.js +63 -1
- package/build/tp.js +51 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Features
|
|
|
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
48
|
Cards — Read
|
|
49
|
-
- `
|
|
49
|
+
- `get_card_current_status` — Get EntityState, TeamState, and assigned teams for a card (id, optional resourceType: UserStory | Bug | Feature, default: UserStory)
|
|
50
50
|
- `get_bug_content` — Fetch full content of a bug by ID (id)
|
|
51
51
|
- `get_user_story_content` — Fetch full content of a user story by ID (id)
|
|
52
52
|
- `get_bug_comments` — Get comments on a bug (id, optional results)
|
|
@@ -56,7 +56,7 @@ Cards — Read
|
|
|
56
56
|
|
|
57
57
|
Cards — Write
|
|
58
58
|
- `add_comment` — Post a comment to any card (id, comment)
|
|
59
|
-
- `create_bug` — Create a standalone bug (title, bugContent, optional origin, optional projectId, optional teamId)
|
|
59
|
+
- `create_bug` — Create a standalone bug (title, bugContent, optional origin, optional projectId, optional teamId, optional entityStateId)
|
|
60
60
|
> `origin` accepted values: `Production - Customer`, `Production - Internal`, `Pre-Release - Customer`, `Pre-Release - Internal`, `Regression - Dev01`, `Regression - Team Env`, `Manual QA` *(default)*, `Developer Raised`, `Operations`
|
|
61
61
|
> [!NOTE]
|
|
62
62
|
> `projectId` and `teamId` are optional — fall back to `TP_PROJECT_ID` and `TP_TEAM_ID` from config
|
|
@@ -77,6 +77,10 @@ Test Case Workflows
|
|
|
77
77
|
- `write_test_cases` — Fetch a card (UserStory, Bug, or Feature) by ID and trigger the full test case writing workflow: Claude analyzes the card, generates detailed test cases covering happy path, edge cases, and error scenarios, creates a linked test plan via `create_test_plan`, then calls `add_test_cases_to_test_plan`. Each test case description contains Preconditions and Test Type as HTML; steps are passed as a structured array (resourceId, optional resourceType)
|
|
78
78
|
- `add_test_cases_to_test_plan` — Add pre-generated test cases to an existing test plan. Each test case has a `name`, an HTML `description` (Preconditions and Test Type only), and a `steps` array of `{ description, result }` objects — steps are created via the TP test step API rather than embedded in the description (testPlanId, testCases array of {name, description, steps})
|
|
79
79
|
|
|
80
|
+
Processes
|
|
81
|
+
- `get_processes` — Get all Targetprocess processes (no params needed)
|
|
82
|
+
- `get_process_workflows` — Get workflows for a specific process (processId)
|
|
83
|
+
|
|
80
84
|
Projects
|
|
81
85
|
- `get_projects` — Get all Targetprocess projects (no params needed)
|
|
82
86
|
|
package/build/config.js
CHANGED
|
@@ -6,5 +6,8 @@ export const config = {
|
|
|
6
6
|
ownerId: process.env.TP_OWNER_ID || "1504",
|
|
7
7
|
projectId: process.env.TP_PROJECT_ID || "",
|
|
8
8
|
teamId: process.env.TP_TEAM_ID || "",
|
|
9
|
+
processId: process.env.TP_PROCESS_ID || "",
|
|
10
|
+
userStoryWorkflowId: process.env.TP_USER_STORY_WORKFLOW_ID || "",
|
|
11
|
+
bugWorkflowId: process.env.TP_BUG_WORKFLOW_ID || "",
|
|
9
12
|
}
|
|
10
13
|
};
|
package/build/index.js
CHANGED
|
@@ -1244,7 +1244,69 @@ server.registerTool('add_test_cases_to_test_plan', {
|
|
|
1244
1244
|
}]
|
|
1245
1245
|
};
|
|
1246
1246
|
});
|
|
1247
|
-
server.registerTool('
|
|
1247
|
+
server.registerTool('get_process_workflows', {
|
|
1248
|
+
title: 'Get process workflows',
|
|
1249
|
+
description: 'Get all Targetprocess process workflows',
|
|
1250
|
+
inputSchema: {
|
|
1251
|
+
processId: z.string()
|
|
1252
|
+
.describe('Process ID (e.g. 145636)'),
|
|
1253
|
+
},
|
|
1254
|
+
}, async ({ processId }) => {
|
|
1255
|
+
const response = await tp.getProcessWorkflows({ processId });
|
|
1256
|
+
if (!response) {
|
|
1257
|
+
return {
|
|
1258
|
+
content: [{
|
|
1259
|
+
type: 'text',
|
|
1260
|
+
text: `Failed to get process workflows, JSON: ${JSON.stringify(response, null, 2)}`
|
|
1261
|
+
}],
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
const items = response.items || [];
|
|
1265
|
+
if (items.length === 0) {
|
|
1266
|
+
return {
|
|
1267
|
+
content: [{
|
|
1268
|
+
type: 'text',
|
|
1269
|
+
text: `No process workflows found`,
|
|
1270
|
+
}],
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
return {
|
|
1274
|
+
content: [{
|
|
1275
|
+
type: 'text',
|
|
1276
|
+
text: JSON.stringify(items)
|
|
1277
|
+
}],
|
|
1278
|
+
};
|
|
1279
|
+
});
|
|
1280
|
+
server.registerTool('get_processes', {
|
|
1281
|
+
title: 'Get processes',
|
|
1282
|
+
description: 'Get all Targetprocess processes',
|
|
1283
|
+
}, async ({}) => {
|
|
1284
|
+
const response = await tp.getProcesses();
|
|
1285
|
+
if (!response) {
|
|
1286
|
+
return {
|
|
1287
|
+
content: [{
|
|
1288
|
+
type: 'text',
|
|
1289
|
+
text: `Failed to get processes, JSON: ${JSON.stringify(response, null, 2)}`
|
|
1290
|
+
}],
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
const items = response.items || [];
|
|
1294
|
+
if (items.length === 0) {
|
|
1295
|
+
return {
|
|
1296
|
+
content: [{
|
|
1297
|
+
type: 'text',
|
|
1298
|
+
text: `No processes found`,
|
|
1299
|
+
}],
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
return {
|
|
1303
|
+
content: [{
|
|
1304
|
+
type: 'text',
|
|
1305
|
+
text: JSON.stringify(items)
|
|
1306
|
+
}],
|
|
1307
|
+
};
|
|
1308
|
+
});
|
|
1309
|
+
server.registerTool('get_card_current_status', {
|
|
1248
1310
|
title: 'Get card status',
|
|
1249
1311
|
description: 'Get the EntityState, TeamState, and assigned teams for a TP card (UserStory, Bug, or Feature) by ID',
|
|
1250
1312
|
inputSchema: {
|
package/build/tp.js
CHANGED
|
@@ -130,6 +130,30 @@ export class TpClient {
|
|
|
130
130
|
param: { "format": "json" },
|
|
131
131
|
}, bug);
|
|
132
132
|
}
|
|
133
|
+
async updateUserStory({ title, description, projectId, teamId }) {
|
|
134
|
+
const userStory = {
|
|
135
|
+
"Name": title,
|
|
136
|
+
"Description": description,
|
|
137
|
+
"Project": {
|
|
138
|
+
"Id": projectId || config.tp.projectId
|
|
139
|
+
},
|
|
140
|
+
"assignedTeams": [
|
|
141
|
+
{
|
|
142
|
+
"entityState": {
|
|
143
|
+
"id": 7407
|
|
144
|
+
},
|
|
145
|
+
"id": 84252,
|
|
146
|
+
"team": {
|
|
147
|
+
"id": teamId || config.tp.teamId
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
return this.post({
|
|
153
|
+
pathParam: ["UserStories"],
|
|
154
|
+
param: { "format": "json" },
|
|
155
|
+
}, userStory);
|
|
156
|
+
}
|
|
133
157
|
async createBugOnly({ title, bugContent, origin = "Manual QA", projectId, teamId }) {
|
|
134
158
|
const bug = {
|
|
135
159
|
"Name": title,
|
|
@@ -460,6 +484,33 @@ export class TpClient {
|
|
|
460
484
|
param: { "format": "json" },
|
|
461
485
|
});
|
|
462
486
|
}
|
|
487
|
+
async getProcessWorkflows({ processId }) {
|
|
488
|
+
return this.get({
|
|
489
|
+
pathParam: ["Process"],
|
|
490
|
+
param: {
|
|
491
|
+
"format": "json",
|
|
492
|
+
"where": `id=(${processId})`,
|
|
493
|
+
"select": `{Workflows}`
|
|
494
|
+
},
|
|
495
|
+
apiVersion: this.v2
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
async getUserStories({ take = 100 }) {
|
|
499
|
+
return this.get({
|
|
500
|
+
pathParam: ["userStories"],
|
|
501
|
+
param: {
|
|
502
|
+
"format": "json",
|
|
503
|
+
"take": take,
|
|
504
|
+
},
|
|
505
|
+
apiVersion: this.v2
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
async getProcesses() {
|
|
509
|
+
return this.get({
|
|
510
|
+
pathParam: ["Processes"],
|
|
511
|
+
param: { "format": "json" },
|
|
512
|
+
});
|
|
513
|
+
}
|
|
463
514
|
async getTeams() {
|
|
464
515
|
return this.get({
|
|
465
516
|
pathParam: ["Teams"],
|