Skip to main content
Glama

zap.get_active_scan_status

Check the current progress and status of active vulnerability scans in the VulneraMCP security testing platform to monitor ongoing security assessments.

Instructions

Get the status of an active scan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scanIdYesActive scan ID

Implementation Reference

  • MCP tool registration for 'zap.get_active_scan_status', including input schema (requires scanId: string) and handler function that delegates to ZAPClient.getActiveScanStatus.
    server.tool( 'zap.get_active_scan_status', { description: 'Get the status of an active scan', inputSchema: { type: 'object', properties: { scanId: { type: 'string', description: 'Active scan ID', }, }, required: ['scanId'], }, }, async ({ scanId }: any): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getActiveScanStatus(scanId); return formatToolResult(result.success, result.data, result.error); } );
  • The MCP tool handler function executing the tool logic: checks ZAP client and calls getActiveScanStatus.
    async ({ scanId }: any): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getActiveScanStatus(scanId); return formatToolResult(result.success, result.data, result.error); }
  • Tool metadata including description and input schema.
    { description: 'Get the status of an active scan', inputSchema: { type: 'object', properties: { scanId: { type: 'string', description: 'Active scan ID', }, }, required: ['scanId'], },
  • ZAPClient helper method implementing the core API call to retrieve active scan status from ZAP's /ascan/view/status/ endpoint.
    async getActiveScanStatus(scanId: string): Promise<ZAPScanResult> { try { const response = await this.client.get('/ascan/view/status/', { params: { scanId: scanId.toString() }, }); return { success: true, data: { scanId, progress: parseInt(response.data.status || '0') || 0, status: response.data.status === '100' ? 'completed' : 'running', }, }; } catch (error: any) { return { success: false, error: error.message || 'Failed to get active scan status', }; } }

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