Skip to main content
Glama

zap.send_request

Send custom HTTP requests through ZAP proxy for security testing and vulnerability assessment in bug bounty hunting workflows.

Instructions

Send a custom HTTP request through ZAP proxy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL
methodNoHTTP method (GET, POST, PUT, DELETE, etc.)GET
headersNoHTTP headers (optional)
bodyNoRequest body (optional)

Implementation Reference

  • MCP tool handler for 'zap.send_request' that delegates to ZAPClient.sendRequest
    async ({ url, method = 'GET', headers, body }: any): Promise<ToolResult> => {
      const client = getZAPClient();
      if (!client) {
        return formatToolResult(false, null, 'ZAP client not initialized');
      }
      const result = await client.sendRequest(url, method, headers, body);
      return formatToolResult(result.success, result.data, result.error);
    }
  • Input schema definition for the 'zap.send_request' tool
    inputSchema: {
      type: 'object',
      properties: {
        url: {
          type: 'string',
          description: 'Target URL',
        },
        method: {
          type: 'string',
          description: 'HTTP method (GET, POST, PUT, DELETE, etc.)',
          default: 'GET',
        },
        headers: {
          type: 'object',
          description: 'HTTP headers (optional)',
        },
        body: {
          type: 'string',
          description: 'Request body (optional)',
        },
      },
      required: ['url'],
    },
  • Registration of the 'zap.send_request' tool within registerZAPTools function
    server.tool(
      'zap.send_request',
      {
        description: 'Send a custom HTTP request through ZAP proxy',
        inputSchema: {
          type: 'object',
          properties: {
            url: {
              type: 'string',
              description: 'Target URL',
            },
            method: {
              type: 'string',
              description: 'HTTP method (GET, POST, PUT, DELETE, etc.)',
              default: 'GET',
            },
            headers: {
              type: 'object',
              description: 'HTTP headers (optional)',
            },
            body: {
              type: 'string',
              description: 'Request body (optional)',
            },
          },
          required: ['url'],
        },
      },
      async ({ url, method = 'GET', headers, body }: any): Promise<ToolResult> => {
        const client = getZAPClient();
        if (!client) {
          return formatToolResult(false, null, 'ZAP client not initialized');
        }
        const result = await client.sendRequest(url, method, headers, body);
        return formatToolResult(result.success, result.data, result.error);
      }
    );
  • Core ZAPClient.sendRequest method that implements the HTTP request sending via ZAP's REST API endpoints
    async sendRequest(url: string, method: string = 'GET', headers?: Record<string, string>, body?: string): Promise<ZAPScanResult> {
      try {
        const params: any = { url, method };
        if (headers) {
          // ZAP expects headers as a string in format "HeaderName: HeaderValue"
          params.headers = Object.entries(headers)
            .filter(([k]) => k.toLowerCase() !== 'content-length') // Remove content-length, ZAP will add it
            .map(([k, v]) => `${k}: ${v}`)
            .join('\n');
        }
        if (body) params.body = body;
    
        // Try /core/action/sendRequest/ first, fallback to /httpSender/action/sendRequest/
        try {
          const response = await this.client.get('/core/action/sendRequest/', { params });
          return {
            success: true,
            data: response.data,
          };
        } catch (coreError: any) {
          // Fallback to httpSender endpoint
          const response = await this.client.get('/httpSender/action/sendRequest/', { params });
          return {
            success: true,
            data: response.data,
          };
        }
      } catch (error: any) {
        return {
          success: false,
          error: error.message || 'Failed to send request',
        };
      }
    }
  • src/index.ts:49-49 (registration)
    Invocation of registerZAPTools where all ZAP tools including 'zap.send_request' are registered to the MCP server.
    registerZAPTools(server);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool sends requests 'through ZAP proxy' which implies potential interception or logging, but doesn't specify whether this requires ZAP to be running, what authentication or permissions are needed, if there are rate limits, or what the response format looks like. This leaves significant behavioral gaps.

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, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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

Completeness2/5

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

For a tool that sends HTTP requests through a security proxy with 4 parameters and no annotations or output schema, the description is insufficient. It doesn't explain what 'through ZAP proxy' means operationally, what the tool returns, or any prerequisites for using ZAP functionality, leaving the agent with significant uncertainty.

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 all parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema descriptions, maintaining the baseline score of 3 for high schema coverage.

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 ('send a custom HTTP request') and the resource ('through ZAP proxy'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential alternatives like direct HTTP libraries or other proxy tools, which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where ZAP proxy's interception, logging, or security testing features are beneficial compared to direct HTTP requests or other tools in the sibling list.

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