Skip to main content
Glama

zap.health_check

Verify ZAP security tool connectivity and operational status to ensure vulnerability testing readiness within the VulneraMCP bug bounty platform.

Instructions

Check if ZAP is running and accessible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools/zap.ts:39-56 (registration)
    Registers the zap.health_check MCP tool with input schema (no parameters) and handler that verifies ZAP client and delegates to ZAPClient.healthCheck()
    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); } );
  • Core implementation of health check in ZAPClient class: queries ZAP API /core/view/version/ endpoint to confirm ZAP is running
    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', }; } }
  • getZAPClient() returns the singleton ZAPClient instance used by the tool handler
    export function getZAPClient(): ZAPClient | null { return zapClient; }
  • initZAP() initializes the singleton ZAPClient instance (called during tool registration)
    export function initZAP(baseURL?: string, apiKey?: string): ZAPClient { if (!zapClient) { zapClient = new ZAPClient( baseURL || process.env.ZAP_URL || 'http://localhost:8081', apiKey || process.env.ZAP_API_KEY ); } return zapClient; }
  • src/index.ts:49-49 (registration)
    Main server initialization calls registerZAPTools(server) to register all ZAP tools including zap.health_check
    registerZAPTools(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/telmon95/VulneraMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server