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
* Registers the docs search tool with the MCP server
7
9
* @param agent The MCP server instance
@@ -18,7 +20,7 @@ export function registerDocsTools(agent: CloudflareDocumentationMCP) {
18
20
- You are unsure of how to use some Cloudflare functionality
19
21
- You are writing Cloudflare Workers code and need to look up Workers-specific documentation
20
22
21
-
This tool returns a number of results from a vector database. These are embedded as resources in the response and are plaintext doucments in a variety of formats.
23
+
This tool returns a number of results from a vector database. These are embedded as resources in the response and are plaintext documents in a variety of formats.
22
24
`,
23
25
{
24
26
// partially pulled from autorag query optimization example
@@ -28,35 +30,46 @@ export function registerDocsTools(agent: CloudflareDocumentationMCP) {
28
30
3. Remove irrelevant filler words
29
31
4. Structure the query to emphasize key terms
30
32
5. Include technical or domain-specific terminology if applicable`),
31
-
scoreThreshold: z.number().min(0).max(1).optional().describe("A score threshold (0-1) for which matches should be included."),
32
-
maxNumResults: z.number().default(10).optional().describe("The maximum number of results to return.")
33
+
scoreThreshold: z
34
+
.number()
35
+
.min(0)
36
+
.max(1)
37
+
.optional()
38
+
.describe('A score threshold (0-1) for which matches should be included.'),
39
+
maxNumResults: z
40
+
.number()
41
+
.default(10)
42
+
.optional()
43
+
.describe('The maximum number of results to return.'),
33
44
},
34
45
async(params)=>{
35
46
// we don't need "rewrite query" OR aiSearch because an LLM writes the query and formats the output for us.
0 commit comments