@telos.ready/mcp 1.2.0 → 1.4.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 +110 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -273,7 +273,75 @@ server.tool("get-ticket-details", "Gets the details of a ticket. The ticket refe
|
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
-
// Tool 6:
|
|
276
|
+
// Tool 6: Start Ticket
|
|
277
|
+
server.tool("start-ticket", "Starts working on a ticket by retrieving ticket details, and providing next-step guidance. This tool sets up a 30-minute session window during which other MCP tools will automatically provide contextual next steps.", {
|
|
278
|
+
ticketReference: z
|
|
279
|
+
.string()
|
|
280
|
+
.describe('The ticket reference for the ticket to start working on, which is an uppercase alphabetical code followed by a number, such as "TEL037".'),
|
|
281
|
+
}, async ({ ticketReference }) => {
|
|
282
|
+
try {
|
|
283
|
+
const result = await telosClient.post("/mcp/start-ticket", {
|
|
284
|
+
ticketReference,
|
|
285
|
+
});
|
|
286
|
+
if (result.success) {
|
|
287
|
+
return {
|
|
288
|
+
content: [{ type: "text", text: result.result }],
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
return {
|
|
293
|
+
content: [{ type: "text", text: `Error: ${result}` }],
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
return {
|
|
299
|
+
content: [
|
|
300
|
+
{
|
|
301
|
+
type: "text",
|
|
302
|
+
text: `Error starting ticket ${ticketReference}: ${error}`,
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
// Tool 7: Ask Question About Ticket
|
|
309
|
+
server.tool("ask-question-about-ticket", "Asks a question about a specific ticket and gets an AI-generated answer with ticket context. This tool uses the agent service to provide comprehensive answers based on the ticket's content, comments, and related documentation. If within an active MCP session, it will also extend the session and provide next-step guidance.", {
|
|
310
|
+
ticketReference: z
|
|
311
|
+
.string()
|
|
312
|
+
.describe('The ticket reference for the ticket context, which is an uppercase alphabetical code followed by a number, such as "TEL037".'),
|
|
313
|
+
question: z
|
|
314
|
+
.string()
|
|
315
|
+
.describe("The question to ask about the ticket."),
|
|
316
|
+
}, async ({ ticketReference, question }) => {
|
|
317
|
+
try {
|
|
318
|
+
const result = await telosClient.post("/mcp/ask-question-about-ticket", {
|
|
319
|
+
ticketReference,
|
|
320
|
+
question,
|
|
321
|
+
});
|
|
322
|
+
if (result.success) {
|
|
323
|
+
return {
|
|
324
|
+
content: [{ type: "text", text: result.result }],
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
return {
|
|
329
|
+
content: [{ type: "text", text: `Error: ${result}` }],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
catch (error) {
|
|
334
|
+
return {
|
|
335
|
+
content: [
|
|
336
|
+
{
|
|
337
|
+
type: "text",
|
|
338
|
+
text: `Error asking question about ticket ${ticketReference}: ${error}`,
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
// Tool 8: Get Next Task
|
|
277
345
|
server.tool("get-next-task", "Gets the next task for a member and provides a ticket reference, next step and instructions for completing the task.", {
|
|
278
346
|
applicationSlug: z
|
|
279
347
|
.string()
|
|
@@ -483,6 +551,46 @@ server.tool("get-resource-details", "Gets detailed information about a specific
|
|
|
483
551
|
};
|
|
484
552
|
}
|
|
485
553
|
});
|
|
554
|
+
// Tool 12: Answer Question
|
|
555
|
+
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. ", {
|
|
556
|
+
ticketReference: z
|
|
557
|
+
.string()
|
|
558
|
+
.describe('The ticket reference for the ticket containing the question, which is an uppercase alphabetical code followed by a number, such as "TEL037".'),
|
|
559
|
+
questionReference: z
|
|
560
|
+
.string()
|
|
561
|
+
.describe("The six-character alphanumeric reference code for the question (e.g., ABC123)."),
|
|
562
|
+
answer: z
|
|
563
|
+
.string()
|
|
564
|
+
.describe("The answer text content to provide for the question. Maximum 5000 characters."),
|
|
565
|
+
}, async ({ ticketReference, questionReference, answer }) => {
|
|
566
|
+
try {
|
|
567
|
+
const result = await telosClient.post("/mcp/answer-question", {
|
|
568
|
+
ticketReference,
|
|
569
|
+
questionReference,
|
|
570
|
+
answer,
|
|
571
|
+
});
|
|
572
|
+
if (result.success) {
|
|
573
|
+
return {
|
|
574
|
+
content: [{ type: "text", text: result.result }],
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
return {
|
|
579
|
+
content: [{ type: "text", text: `Error: ${result.error}` }],
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
catch (error) {
|
|
584
|
+
return {
|
|
585
|
+
content: [
|
|
586
|
+
{
|
|
587
|
+
type: "text",
|
|
588
|
+
text: `Error answering question ${questionReference} on ticket ${ticketReference}: ${error.message}`,
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
});
|
|
486
594
|
async function main() {
|
|
487
595
|
try {
|
|
488
596
|
// Initialize transport first
|
|
@@ -495,7 +603,7 @@ async function main() {
|
|
|
495
603
|
await server.connect(transport);
|
|
496
604
|
// Log success message
|
|
497
605
|
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");
|
|
606
|
+
console.error("Available tools: ask-question, search-documentation, add-ticket-comment, add-documentation, get-ticket-details, start-ticket, ask-question-about-ticket, get-next-task, get-git-branch-for-ticket, mark-ticket-as-blocked, update-action-item, get-resource-list, get-resource-details, answer-question");
|
|
499
607
|
// Test connection in background without blocking or exiting
|
|
500
608
|
// This is non-critical and should not cause the server to exit
|
|
501
609
|
setImmediate(async () => {
|