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',
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'discovered URLs' but doesn't specify if this is a read-only operation, requires prior scans, includes pagination, rate limits, or authentication needs. This leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words, making it easy to parse and front-loaded with the core purpose. It efficiently communicates the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. However, it lacks details on behavior, output format, and differentiation from siblings, which could hinder an agent's ability to use it correctly in a security testing context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the optional 'baseURL' parameter. The description doesn't add any additional meaning beyond what's in the schema, such as examples or context for filtering. This meets the baseline for high schema coverage but doesn't enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get list') and resource ('discovered URLs from ZAP'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'zap.get_sites' or 'zap.get_alerts', which might also retrieve URL-related data, leaving some ambiguity about what specifically distinguishes this tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for post-scan results, real-time monitoring, or how it differs from 'zap.get_sites' or 'zap.get_alerts', leaving the agent to infer usage context without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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