Skip to content

Commit 51744ce

Browse files
committed
Add tool for analyzing WARP-diags for common issues via bonobo
1 parent dd835ec commit 51744ce

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

apps/dex-analysis/src/tools/dex-analysis.tools.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,33 @@ export function registerDEXTools(agent: CloudflareDEXMCP) {
561561
return await reader.read(accessToken, download, filepath)
562562
},
563563
})
564+
565+
registerTool({
566+
name: 'dex_analyze_warp_diag',
567+
description:
568+
'Analyze successful WARP-diag remote captures for common issues. This should be the first place you start when trying to narrow down device-level issues with WARP.',
569+
schema: {
570+
command_id: z
571+
.string()
572+
.describe('The command_id of the successful WARP-diag remote capture to analyze.'),
573+
},
574+
llmContext:
575+
'Detections with 0 occurences can be ruled out. Focus on detections with the highest severity.',
576+
agent,
577+
callback: async ({ accessToken, accountId, command_id }) => {
578+
return await fetchCloudflareApi({
579+
endpoint: `/dex/commands/${command_id}/analysis`,
580+
accountId,
581+
apiToken: accessToken,
582+
options: {
583+
method: 'GET',
584+
headers: {
585+
'Content-Type': 'application/json',
586+
},
587+
},
588+
})
589+
},
590+
})
564591
}
565592

566593
// Helper to simplify tool registration by reducing boilerplate for accountId and accessToken

0 commit comments

Comments
 (0)