@telos.ready/mcp 1.2.0 → 1.3.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/build/index.js +41 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -483,6 +483,46 @@ server.tool("get-resource-details", "Gets detailed information about a specific
|
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
+
// Tool 12: Answer Question
|
|
487
|
+
server.tool("answer-question", "Answers a question that was previously asked with a TECHNICAL or BUSINESS question type. Questions are identified by their six-character reference code. ", {
|
|
488
|
+
ticketReference: z
|
|
489
|
+
.string()
|
|
490
|
+
.describe('The ticket reference for the ticket containing the question, which is an uppercase alphabetical code followed by a number, such as "TEL037".'),
|
|
491
|
+
questionReference: z
|
|
492
|
+
.string()
|
|
493
|
+
.describe("The six-character alphanumeric reference code for the question (e.g., ABC123)."),
|
|
494
|
+
answer: z
|
|
495
|
+
.string()
|
|
496
|
+
.describe("The answer text content to provide for the question. Maximum 5000 characters."),
|
|
497
|
+
}, async ({ ticketReference, questionReference, answer }) => {
|
|
498
|
+
try {
|
|
499
|
+
const result = await telosClient.post("/mcp/answer-question", {
|
|
500
|
+
ticketReference,
|
|
501
|
+
questionReference,
|
|
502
|
+
answer,
|
|
503
|
+
});
|
|
504
|
+
if (result.success) {
|
|
505
|
+
return {
|
|
506
|
+
content: [{ type: "text", text: result.result }],
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
return {
|
|
511
|
+
content: [{ type: "text", text: `Error: ${result.error}` }],
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
catch (error) {
|
|
516
|
+
return {
|
|
517
|
+
content: [
|
|
518
|
+
{
|
|
519
|
+
type: "text",
|
|
520
|
+
text: `Error answering question ${questionReference} on ticket ${ticketReference}: ${error.message}`,
|
|
521
|
+
},
|
|
522
|
+
],
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
});
|
|
486
526
|
async function main() {
|
|
487
527
|
try {
|
|
488
528
|
// Initialize transport first
|
|
@@ -495,7 +535,7 @@ async function main() {
|
|
|
495
535
|
await server.connect(transport);
|
|
496
536
|
// Log success message
|
|
497
537
|
console.error("✅ Telos MCP Server running on stdio");
|
|
498
|
-
console.error("Available tools: ask-question, search-documentation, add-ticket-comment, add-documentation, get-ticket-details, get-next-task, get-git-branch-for-ticket, mark-ticket-as-blocked, update-action-item, get-resource-list, get-resource-details");
|
|
538
|
+
console.error("Available tools: ask-question, search-documentation, add-ticket-comment, add-documentation, get-ticket-details, get-next-task, get-git-branch-for-ticket, mark-ticket-as-blocked, update-action-item, get-resource-list, get-resource-details, answer-question");
|
|
499
539
|
// Test connection in background without blocking or exiting
|
|
500
540
|
// This is non-critical and should not cause the server to exit
|
|
501
541
|
setImmediate(async () => {
|