Skip to main content
Glama

zap.get_sites

Retrieve discovered websites from OWASP ZAP for security testing and vulnerability assessment in bug bounty hunting workflows.

Instructions

Get list of discovered sites from ZAP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'zap.get_sites': retrieves the ZAP client instance and calls its getSites() method, handling errors and formatting the result using formatToolResult.
    async (): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getSites(); return formatToolResult(result.success, result.data, result.error); }
  • Core helper method ZAPClient.getSites(): queries the ZAP API endpoint '/core/view/sites/' via axios to fetch discovered sites tree.
    async getSites(): Promise<ZAPScanResult> { try { const response = await this.client.get('/core/view/sites/'); return { success: true, data: { sites: response.data.sites || [], }, }; } catch (error: any) { return { success: false, error: error.message || 'Failed to get sites', }; } }
  • Registers the 'zap.get_sites' tool with the MCP server inside registerZAPTools function, providing schema and handler.
    server.tool( 'zap.get_sites', { description: 'Get list of discovered sites from ZAP', inputSchema: { type: 'object', properties: {}, }, }, async (): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getSites(); return formatToolResult(result.success, result.data, result.error); } );
  • Input schema for 'zap.get_sites': requires no parameters (empty properties). Includes tool description.
    { description: 'Get list of discovered sites from ZAP', inputSchema: { type: 'object', properties: {}, }, },

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