zap.health_check
Verify ZAP security tool connectivity and operational status to ensure vulnerability scanning readiness.
Instructions
Check if ZAP is running and accessible
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/zap.ts:48-55 (handler)The main handler function for the 'zap.health_check' tool. It checks if the ZAP client is initialized and performs the health check by calling client.healthCheck(), then formats the result.async (): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.healthCheck(); return formatToolResult(result.success, result.data, result.error); }
- src/tools/zap.ts:41-47 (schema)Input schema and description for the 'zap.health_check' tool. No input parameters required.{ description: 'Check if ZAP is running and accessible', inputSchema: { type: 'object', properties: {}, }, },
- src/tools/zap.ts:39-56 (registration)Local registration of the 'zap.health_check' tool within the registerZAPTools function using server.tool().server.tool( 'zap.health_check', { description: 'Check if ZAP is running and accessible', inputSchema: { type: 'object', properties: {}, }, }, async (): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.healthCheck(); return formatToolResult(result.success, result.data, result.error); } );
- src/index.ts:49-49 (registration)Top-level registration call in the main server setup that invokes registerZAPTools(server), thereby registering the 'zap.health_check' tool.registerZAPTools(server);
- src/integrations/zap.ts:71-87 (helper)The ZAPClient.healthCheck() method implementation that actually queries ZAP's version endpoint to verify accessibility.async healthCheck(): Promise<ZAPScanResult> { try { const response = await this.client.get('/core/view/version/'); return { success: true, data: { version: response.data.version, status: 'running', }, }; } catch (error: any) { return { success: false, error: error.message || 'ZAP is not accessible', }; } }