Skip to content

Commit eb8d151

Browse files
committed
Remove question tool for now as it's too slow
1 parent 422429b commit eb8d151

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

netlify/edge-functions/mcp-server.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ if (!apiKey || !projectId || !integrationId) {
1414
);
1515
}
1616

17-
interface QuestionResponse {
18-
answer: string;
19-
relevant_sources: Array<{
20-
source_url: string;
21-
title: string;
22-
contains_internal_data: boolean;
23-
}>;
24-
}
25-
2617
interface SearchResponse {
2718
search_results: Array<{
2819
title: string;
@@ -44,34 +35,6 @@ function getServer(): McpServer {
4435
},
4536
}
4637
);
47-
server.registerTool(
48-
"ask_astro_question",
49-
{
50-
title: "Ask Astro question",
51-
description: "Ask a technical question about Astro framework",
52-
inputSchema: {
53-
query: z.string().describe("The question to ask about Astro"),
54-
},
55-
},
56-
async ({ query }) => {
57-
if (!query) {
58-
throw new Error("Query is required");
59-
}
60-
const result = await sendKapaRequest<QuestionResponse>("chat", query);
61-
if ("error" in result) {
62-
return formatResponse(result);
63-
}
64-
return formatResponse({
65-
answer: result.answer,
66-
relevant_sources: result.relevant_sources.map(
67-
({ source_url, title }) => ({
68-
source_url,
69-
title,
70-
})
71-
),
72-
});
73-
}
74-
);
7538

7639
server.registerTool(
7740
"search_astro_docs",

0 commit comments

Comments
 (0)