You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query: z.string().describe("The query to get relevant data questions for, this could be a high level task or question the user is asking or hoping to get answered. You can pass the complete raw query as the system is smart to make sense of it."),
18
+
additionalContext: z.string()
19
+
.describe("Additional context to add to the query, this might be older data returned for previous questions or any other relevant context that might help the system generate better questions.")
20
+
.optional(),
21
+
datasourceId: z.string()
22
+
.describe("The datasource to get questions for, this is the id of the datasource to get data from")
23
+
.optional()
24
+
});
25
+
16
26
constGetRelevantDataSchema=z.object({
17
27
query: z.string().describe("The query to get relevant data for, this could be a high level task or question the user is asking or hoping to get answered. You can pass the complete raw query as the system is smart to make sense of it."),
18
28
datasourceId: z.string()
19
29
.describe("The datasource to get data from, this is the id of the datasource to get data from")
20
30
.optional()
21
31
});
22
32
33
+
constGetAnswerSchema=z.object({
34
+
question: z.string().describe("The question to get the answer for, these are generally the questions generated by the getRelevantQuestions tool."),
35
+
datasourceId: z.string()
36
+
.describe("The datasource to get the answer for, this is the id of the datasource to get data from")
37
+
});
38
+
39
+
constCreateLiveboardSchema=z.object({
40
+
name: z.string().describe("The name of the liveboard to create"),
41
+
answers: z.array(z.object({
42
+
question: z.string(),
43
+
session_identifier: z.string(),
44
+
generation_number: z.number(),
45
+
})).describe("The answers to create the liveboard from, these are the answers generated by the getAnswer tool."),
46
+
});
47
+
23
48
enumToolName{
24
49
Ping="ping",
25
-
GetRelevantData="getRelevantData",
50
+
GetRelevantQuestions="getRelevantQuestions",
51
+
GetAnswer="getAnswer",
52
+
CreateLiveboard="createLiveboard",
26
53
}
27
54
28
55
interfaceContext{
@@ -54,9 +81,19 @@ export class MCPServer extends Server {
text: `Question: ${question}\nSession Identifier: ${answer.session_identifier}\nGeneration Number: ${answer.generation_number} \n\nUse this information to create a liveboard with the createLiveboard tool, if the user asks.`,
0 commit comments