Skip to main content
Glama
Spritualkb

nuclei-server MCP Server

by Spritualkb

cancel_scan

Stop an active security scan by providing its scan ID. Use this tool to halt ongoing vulnerability assessments in the nuclei-server environment.

Instructions

Cancel a running scan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scanIdYesScan ID to cancel

Implementation Reference

  • Handler for the 'cancel_scan' tool: validates the scan ID, checks if running, kills the process, resets progress, sets status to 'canceled', and returns confirmation.
    if (request.params.name === "cancel_scan") {
      const { scanId } = request.params.arguments as { scanId: string };
    
      const scan = scans[scanId];
      if (!scan) {
        return { content: [{ type: "text", text: `Scan ${scanId} not found` }], isError: true };
      }
    
      if (scan.status !== "running" || !scan.process) {
        return { content: [{ type: "text", text: `Scan ${scanId} is not running` }], isError: true };
      }
    
      scan.process.kill();
      scans[scanId].progress = 0;
      scan.status = "canceled";
    
      return { content: [{ type: "text", text: `Scan ${scanId} has been canceled` }] };
    }
  • src/index.ts:96-107 (registration)
    Registration of the 'cancel_scan' tool in ListToolsRequestSchema response, including name, description, and input schema.
      {
        name: "cancel_scan",
        description: "Cancel a running scan",
        inputSchema: {
          type: "object",
          properties: {
            scanId: { type: "string", description: "Scan ID to cancel" },
          },
          required: ["scanId"],
        },
      },
    ],
  • Input schema definition for 'cancel_scan' tool, requiring a 'scanId' string.
    inputSchema: {
      type: "object",
      properties: {
        scanId: { type: "string", description: "Scan ID to cancel" },
      },
      required: ["scanId"],
    },
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. 'Cancel' implies a mutation operation that stops an ongoing process, but the description doesn't address important behavioral aspects: whether cancellation is reversible, what permissions are required, what happens to partial scan results, or how to verify the scan was running. For a mutation tool with zero annotation coverage, this is inadequate.

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 maximally concise - a single four-word sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple tool with one parameter and clear basic functionality.

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 mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address the tool's behavioral implications, error conditions, or relationship to the sibling 'start_scan' tool. The agent would need to guess about important aspects like what constitutes a 'running' scan, cancellation effects, and verification of success.

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 schema has 100% description coverage, with the single parameter 'scanId' clearly documented in the schema. The description doesn't add any parameter semantics beyond what's already in the schema, but since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 ('cancel') and target ('a running scan'), providing specific verb+resource. However, it doesn't differentiate from the sibling tool 'start_scan' beyond the obvious verb difference, missing an opportunity to clarify the relationship between these complementary operations.

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, prerequisites, or constraints. While the presence of 'start_scan' as a sibling suggests a workflow relationship, the description doesn't explicitly state this or provide any usage context beyond the basic action.

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/Spritualkb/nuclei-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server