targetprocess-mcp-server 1.0.13 → 1.0.14
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 +1 -4
- package/build/index.js +24 -11
- package/build/tp.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,13 +25,10 @@ It acts as a **bridge between LLM agents and the Targetprocess API**, providing:
|
|
|
25
25
|
- "Show me currently active release"
|
|
26
26
|
- "write me test cases based on 145322 tp user story"
|
|
27
27
|
- "add a comment to 145155 card saying 'test'"
|
|
28
|
-
|
|
29
28
|
- "write test cases based on 145640 user story"
|
|
30
29
|
- "write detailed test cases based on 145642 user story, format them inside html <div> element and add them as a comment"
|
|
31
|
-
|
|
32
30
|
- "create a bug based on 145637 user story where Add Tile flyout (for a Static Tile) not show"
|
|
33
|
-
|
|
34
|
-
- search for a card with 'Text Element' title
|
|
31
|
+
- "search for a card with 'Text Element' title"
|
|
35
32
|
|
|
36
33
|
---
|
|
37
34
|
## Available tools:
|
package/build/index.js
CHANGED
|
@@ -397,21 +397,34 @@ server.registerTool('get_bug_content', {
|
|
|
397
397
|
}],
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
};
|
|
400
|
+
let bugResult = {
|
|
401
|
+
name: bug.Name,
|
|
402
|
+
id: bug.Id,
|
|
403
|
+
description: '',
|
|
404
|
+
origin: ''
|
|
405
|
+
};
|
|
406
|
+
try {
|
|
407
|
+
const dom = new JSDOM(`<html><body><div id="content">${bug.Description}</div></body></html>`);
|
|
408
|
+
const descriptionText = dom.window.document.getElementById('content')?.textContent;
|
|
409
|
+
if (descriptionText) {
|
|
410
|
+
bugResult.description = descriptionText;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
console.error("Error parsing bug description:", error);
|
|
415
|
+
console.error("Returning bug without description");
|
|
416
|
+
}
|
|
417
|
+
try {
|
|
418
|
+
bugResult.origin = bug.CustomFields?.find((field) => field?.Value === "Origin")?.Value;
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
console.error("Error parsing bug origin:", error);
|
|
422
|
+
console.error("Returning bug without origin");
|
|
408
423
|
}
|
|
409
|
-
const dom = new JSDOM(`<html><body><div id="content">${description}</div></body></html>`);
|
|
410
|
-
const descriptionText = dom.window.document.getElementById('content')?.textContent;
|
|
411
424
|
return {
|
|
412
425
|
content: [{
|
|
413
426
|
type: 'text',
|
|
414
|
-
text: JSON.stringify(
|
|
427
|
+
text: JSON.stringify(bugResult)
|
|
415
428
|
}],
|
|
416
429
|
};
|
|
417
430
|
});
|
package/build/tp.js
CHANGED
|
@@ -12,7 +12,7 @@ export class TpClient {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
params(params) {
|
|
15
|
-
let _url = this.baseUrl + (params.apiVersion
|
|
15
|
+
let _url = this.baseUrl + (params.apiVersion || this.v1);
|
|
16
16
|
for (const [key, value] of Object.entries(params.pathParam)) {
|
|
17
17
|
_url += value ? `/${key}/${value}` : `/${key}`;
|
|
18
18
|
}
|
|
@@ -85,7 +85,7 @@ export class TpClient {
|
|
|
85
85
|
},
|
|
86
86
|
param: {
|
|
87
87
|
"format": "json",
|
|
88
|
-
}
|
|
88
|
+
},
|
|
89
89
|
});
|
|
90
90
|
return response;
|
|
91
91
|
}
|