@telos.ready/mcp 1.0.0 → 1.1.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 +4 -0
- package/build/index.js +52 -16
- package/package.json +1 -1
package/README.md
CHANGED
package/build/index.js
CHANGED
|
@@ -18,7 +18,7 @@ class TelosClient {
|
|
|
18
18
|
this.config = config;
|
|
19
19
|
this.client = axios.create({
|
|
20
20
|
baseURL: config.baseUrl,
|
|
21
|
-
timeout:
|
|
21
|
+
timeout: 300000,
|
|
22
22
|
headers: {
|
|
23
23
|
"User-Agent": "telos-mcp/1.0.0",
|
|
24
24
|
"Content-Type": "application/json",
|
|
@@ -90,17 +90,17 @@ const telosClient = new TelosClient({
|
|
|
90
90
|
apiKey,
|
|
91
91
|
});
|
|
92
92
|
// Tool 1: Ask Question
|
|
93
|
-
server.tool("ask-question", "Asks a question about
|
|
94
|
-
|
|
93
|
+
server.tool("ask-question", "Asks a question about an application and gets an answer with supporting context. This tool uses the agent service to provide comprehensive answers with relevant documentation. Provide both an application slug and a specific question.", {
|
|
94
|
+
applicationSlug: z
|
|
95
95
|
.string()
|
|
96
|
-
.describe('The
|
|
96
|
+
.describe('The application slug for the application you want to ask a question about, which is a unique identifier string used to reference specific applications.'),
|
|
97
97
|
question: z
|
|
98
98
|
.string()
|
|
99
|
-
.describe("The question you want to ask about the
|
|
100
|
-
}, async ({
|
|
99
|
+
.describe("The question you want to ask about the application."),
|
|
100
|
+
}, async ({ applicationSlug, question }) => {
|
|
101
101
|
try {
|
|
102
102
|
const result = await telosClient.post("/mcp/ask-question", {
|
|
103
|
-
|
|
103
|
+
applicationSlug,
|
|
104
104
|
question,
|
|
105
105
|
});
|
|
106
106
|
if (result.success) {
|
|
@@ -119,13 +119,49 @@ server.tool("ask-question", "Asks a question about a ticket and gets an answer w
|
|
|
119
119
|
content: [
|
|
120
120
|
{
|
|
121
121
|
type: "text",
|
|
122
|
-
text: `Error asking question about
|
|
122
|
+
text: `Error asking question about application ${applicationSlug}: ${error}`,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
// Tool 2: Search Documentation
|
|
129
|
+
server.tool("search-documentation", "Searches documentation for an application to get relevant context. Documentation includes information about application resources, concepts, stories and known solutions. Provide both an application slug and a specific query.", {
|
|
130
|
+
applicationSlug: z
|
|
131
|
+
.string()
|
|
132
|
+
.describe('The application slug for the application you want to search documentation for, which is a unique identifier string used to reference specific applications.'),
|
|
133
|
+
query: z
|
|
134
|
+
.string()
|
|
135
|
+
.describe("The query to search for in the documentation."),
|
|
136
|
+
}, async ({ applicationSlug, query }) => {
|
|
137
|
+
try {
|
|
138
|
+
const result = await telosClient.post("/mcp/search-documentation", {
|
|
139
|
+
applicationSlug,
|
|
140
|
+
query,
|
|
141
|
+
});
|
|
142
|
+
if (result.success) {
|
|
143
|
+
return {
|
|
144
|
+
content: [{ type: "text", text: result.result }],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return {
|
|
149
|
+
content: [{ type: "text", text: `Error: ${result}` }],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
return {
|
|
155
|
+
content: [
|
|
156
|
+
{
|
|
157
|
+
type: "text",
|
|
158
|
+
text: `Error searching documentation for application ${applicationSlug}: ${error}`,
|
|
123
159
|
},
|
|
124
160
|
],
|
|
125
161
|
};
|
|
126
162
|
}
|
|
127
163
|
});
|
|
128
|
-
// Tool
|
|
164
|
+
// Tool 3: Add Ticket Comment
|
|
129
165
|
server.tool("add-ticket-comment", "Adds a comment to an existing ticket. This tool allows adding a comment to a specific ticket with proper attribution.", {
|
|
130
166
|
ticketReference: z
|
|
131
167
|
.string()
|
|
@@ -167,7 +203,7 @@ server.tool("add-ticket-comment", "Adds a comment to an existing ticket. This to
|
|
|
167
203
|
};
|
|
168
204
|
}
|
|
169
205
|
});
|
|
170
|
-
// Tool
|
|
206
|
+
// Tool 4: Add Documentation (Create Knowledge Ticket)
|
|
171
207
|
server.tool("add-documentation", "Creates a new knowledge ticket with documentation content. Only use this tool if a comment cannot be added directly to a ticket. This tool creates a knowledge ticket that can be used to store and organize documentation, procedures, guides, or any other knowledge-based content for future reference.", {
|
|
172
208
|
content: z
|
|
173
209
|
.string()
|
|
@@ -205,7 +241,7 @@ server.tool("add-documentation", "Creates a new knowledge ticket with documentat
|
|
|
205
241
|
};
|
|
206
242
|
}
|
|
207
243
|
});
|
|
208
|
-
// Tool
|
|
244
|
+
// Tool 5: Get Ticket Details
|
|
209
245
|
server.tool("get-ticket-details", "Gets the details of a ticket. The ticket reference must be provided. This tool will provide the initial description of the ticket and any comments that users have made on the ticket.", {
|
|
210
246
|
ticketReference: z
|
|
211
247
|
.string()
|
|
@@ -237,7 +273,7 @@ server.tool("get-ticket-details", "Gets the details of a ticket. The ticket refe
|
|
|
237
273
|
};
|
|
238
274
|
}
|
|
239
275
|
});
|
|
240
|
-
// Tool
|
|
276
|
+
// Tool 6: Get Next Task
|
|
241
277
|
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.", {
|
|
242
278
|
applicationSlug: z
|
|
243
279
|
.string()
|
|
@@ -269,7 +305,7 @@ server.tool("get-next-task", "Gets the next task for a member and provides a tic
|
|
|
269
305
|
};
|
|
270
306
|
}
|
|
271
307
|
});
|
|
272
|
-
// Tool
|
|
308
|
+
// Tool 7: Get Git Branch for Ticket
|
|
273
309
|
server.tool("get-git-branch-for-ticket", "Gets the git branch to be used for development work on this ticket. All commits for this ticket must use this branch. Git branches must stay ahead of main.", {
|
|
274
310
|
ticketReference: z
|
|
275
311
|
.string()
|
|
@@ -301,7 +337,7 @@ server.tool("get-git-branch-for-ticket", "Gets the git branch to be used for dev
|
|
|
301
337
|
};
|
|
302
338
|
}
|
|
303
339
|
});
|
|
304
|
-
// Tool
|
|
340
|
+
// Tool 8: Mark Ticket as Blocked
|
|
305
341
|
server.tool("mark-ticket-as-blocked", "Marks a ticket as blocked with a specified reason. This tool will load the ticket, add a comment with the blocking reason, and set the ticket status to blocked.", {
|
|
306
342
|
ticketReference: z
|
|
307
343
|
.string()
|
|
@@ -337,7 +373,7 @@ server.tool("mark-ticket-as-blocked", "Marks a ticket as blocked with a specifie
|
|
|
337
373
|
};
|
|
338
374
|
}
|
|
339
375
|
});
|
|
340
|
-
// Tool
|
|
376
|
+
// Tool 9: Update Action Item
|
|
341
377
|
server.tool("update-action-item", "Updates the status of an action item in a ticket. This tool finds a specific action item in the ticket or its comments and updates its status to INCOMPLETE, INPROGRESS, or COMPLETED.", {
|
|
342
378
|
ticketReference: z
|
|
343
379
|
.string()
|
|
@@ -389,7 +425,7 @@ async function main() {
|
|
|
389
425
|
await server.connect(transport);
|
|
390
426
|
// Log success message
|
|
391
427
|
console.error("✅ Telos MCP Server running on stdio");
|
|
392
|
-
console.error("Available tools: ask-question, add-ticket-comment, add-documentation, get-ticket-details, get-next-task, get-git-branch-for-ticket, mark-ticket-as-blocked, update-action-item");
|
|
428
|
+
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");
|
|
393
429
|
// Test connection in background without blocking or exiting
|
|
394
430
|
// This is non-critical and should not cause the server to exit
|
|
395
431
|
setImmediate(async () => {
|