Skip to content

Commit 6e08a6e

Browse files
authored
Merge pull request #216 from cloudflare/jrutherford/MON-1208-warp-diag-analysis-tool
Add tool for analyzing WARP-diags for common issues via bonobo
2 parents dd835ec + 9496e21 commit 6e08a6e

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.changeset/purple-moments-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'dex-analysis': minor
3+
---
4+
5+
Add tool for analyzing WARP-diags for common issues via bonobo

apps/dex-analysis/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Currently available tools:
2323
| | `dex_list_remote_captures` | Retrieve a list of previously created remote captures along with their details and status. |
2424
| | `dex_list_remote_warp_diag_contents` | List the filenames included in a remote WARP diag capture returned by `dex_list_remote_captures`. |
2525
| | `dex_explore_remote_warp_diag_output` | Retreive remote WARP diag file contents by filepath returned by `dex_list_remote_warp_diag_contents`. |
26+
| | `dex_analyze_warp_diag` | Analyze successful WARP-diag remote captures for common issues. |
2627
| **Fleet Status** | `dex_fleet_status_live` | View live metrics for your fleet of zero trust devices for up to the past 1 hour. |
2728
| | `dex_fleet_status_over_time` | View historical metrics for your fleet of zero trust devices over time. |
2829
| | `dex_fleet_status_logs` | View historical logs for your fleet of zero trust devices for up to the past 7 days. |

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)