Skip to main content
Glama

zap.get_active_scan_status

Check the current status of an active vulnerability scan to monitor progress and identify when testing is complete.

Instructions

Get the status of an active scan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scanIdYesActive scan ID

Implementation Reference

  • Registration of the MCP tool 'zap.get_active_scan_status' including input schema and inline 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);
      }
    );
  • Core handler implementation in ZAPClient class: queries ZAP REST API endpoint /ascan/view/status/ to retrieve the scan ID, progress percentage, and status (running/completed).
    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',
        };
      }
    }
  • TypeScript interface defining the structure of the active scan status result returned by the handler.
    export interface ZAPActiveScanResult {
      scanId: string;
      progress: number;
      status: string;
    }
  • Singleton accessor function for the ZAPClient instance, used by the MCP tool handler.
    export function getZAPClient(): ZAPClient | null {
      return zapClient;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves status, implying a read-only operation, but does not specify if it requires authentication, rate limits, error conditions, or what the status output includes (e.g., progress, results). This is a significant gap for a tool with no annotation coverage.

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, direct sentence: 'Get the status of an active scan'. It is front-loaded with the core action and resource, with zero wasted words. This makes it highly concise and well-structured for its purpose.

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?

Given the tool's complexity (status retrieval with no output schema) and lack of annotations, the description is incomplete. It does not explain what 'status' returns (e.g., progress percentage, alerts), how to interpret results, or dependencies on other tools like 'zap.start_active_scan'. This leaves critical context gaps for effective agent use.

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?

The input schema has 100% description coverage, with 'scanId' documented as 'Active scan ID'. The description does not add any meaning beyond this, such as format examples or source context (e.g., from 'zap.start_active_scan'). With high schema coverage, the baseline score of 3 is appropriate, as the schema handles parameter documentation adequately.

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

Purpose3/5

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

The description states the tool's purpose as 'Get the status of an active scan', which is clear but vague. It specifies the verb ('Get') and resource ('status of an active scan'), but does not distinguish it from sibling tools like 'zap.get_spider_status' or explain what 'status' entails. This makes it minimally adequate but lacking specificity.

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 does not mention prerequisites (e.g., needing an active scan ID from 'zap.start_active_scan'), exclusions, or comparisons to siblings like 'zap.get_spider_status'. This leaves usage context entirely implied, resulting in a low score.

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