targetprocess-mcp-server 1.0.22 → 2.0.0
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 +3 -0
- package/build/index.js +29 -0
- package/build/tp.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,9 @@ Cards — Write
|
|
|
61
61
|
Projects
|
|
62
62
|
- `get_projects` — Get all Targetprocess projects (no params needed)
|
|
63
63
|
|
|
64
|
+
Teams
|
|
65
|
+
- `get_teams` — Get all Targetprocess teams returning id and name (no params needed)
|
|
66
|
+
|
|
64
67
|
User
|
|
65
68
|
- `get_logged_in_user` — Get the currently logged-in user's info (no params needed)
|
|
66
69
|
|
package/build/index.js
CHANGED
|
@@ -881,6 +881,35 @@ server.registerTool('get_projects', {
|
|
|
881
881
|
}],
|
|
882
882
|
};
|
|
883
883
|
});
|
|
884
|
+
server.registerTool('get_teams', {
|
|
885
|
+
title: 'Get teams',
|
|
886
|
+
description: 'Get all Targetprocess teams',
|
|
887
|
+
}, async ({}) => {
|
|
888
|
+
const response = await tp.getTeams();
|
|
889
|
+
if (!response) {
|
|
890
|
+
return {
|
|
891
|
+
content: [{
|
|
892
|
+
type: 'text',
|
|
893
|
+
text: `Failed to get teams, JSON: ${JSON.stringify(response, null, 2)}`
|
|
894
|
+
}],
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
const items = response.Items || [];
|
|
898
|
+
if (items.length === 0) {
|
|
899
|
+
return {
|
|
900
|
+
content: [{
|
|
901
|
+
type: 'text',
|
|
902
|
+
text: `No teams found`,
|
|
903
|
+
}],
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
return {
|
|
907
|
+
content: [{
|
|
908
|
+
type: 'text',
|
|
909
|
+
text: JSON.stringify(items.map((t) => ({ id: t.Id, name: t.Name })))
|
|
910
|
+
}],
|
|
911
|
+
};
|
|
912
|
+
});
|
|
884
913
|
server.registerTool('get_logged_in_user', {
|
|
885
914
|
title: 'Get logged in user',
|
|
886
915
|
description: 'Get logged in user',
|
package/build/tp.js
CHANGED
|
@@ -345,6 +345,12 @@ export class TpClient {
|
|
|
345
345
|
param: { "format": "json" },
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
+
async getTeams() {
|
|
349
|
+
return this.get({
|
|
350
|
+
pathParam: { "Teams": '' },
|
|
351
|
+
param: { "format": "json" },
|
|
352
|
+
});
|
|
353
|
+
}
|
|
348
354
|
async getContext() {
|
|
349
355
|
return this.get({
|
|
350
356
|
pathParam: { "Context": '' },
|