Skip to main content
Glama

zap.get_urls

Retrieve discovered URLs from ZAP security scans to analyze web application attack surfaces and identify potential entry points for vulnerability testing.

Instructions

Get list of discovered URLs from ZAP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseURLNoFilter by base URL (optional)

Implementation Reference

  • MCP tool handler for 'zap.get_urls'. Retrieves the ZAPClient instance and invokes its getUrls method, formatting the result using formatToolResult.
    async ({ baseURL }: any): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getUrls(baseURL); return formatToolResult(result.success, result.data, result.error); }
  • Input schema definition for the 'zap.get_urls' tool, specifying an optional baseURL parameter.
    { description: 'Get list of discovered URLs from ZAP', inputSchema: { type: 'object', properties: { baseURL: { type: 'string', description: 'Filter by base URL (optional)', }, }, },
  • Full registration of the 'zap.get_urls' MCP tool via server.tool(), including name, schema, and handler function.
    server.tool( 'zap.get_urls', { description: 'Get list of discovered URLs from ZAP', inputSchema: { type: 'object', properties: { baseURL: { type: 'string', description: 'Filter by base URL (optional)', }, }, }, }, async ({ baseURL }: any): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.getUrls(baseURL); return formatToolResult(result.success, result.data, result.error); } );
  • Core helper method in ZAPClient class that fetches the list of URLs from ZAP's REST API endpoint '/core/view/urls/', optionally filtered by baseURL.
    async getUrls(baseURL?: string): Promise<ZAPScanResult> { try { const params: any = {}; if (baseURL) params.baseurl = baseURL; const response = await this.client.get('/core/view/urls/', { params }); return { success: true, data: { urls: response.data.urls || [], }, }; } catch (error: any) { return { success: false, error: error.message || 'Failed to get URLs', }; } }

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