Skip to main content
Glama
Cyreslab-AI

Nessus MCP Server

list_scans

Retrieve and monitor the status of all scans using the Nessus MCP Server. Simplify scan management by accessing a comprehensive list of active and completed scans.

Instructions

List all scans and their status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_scans' tool. It fetches the list of scans using listScans() and returns them as JSON in the MCP response format, handling errors appropriately.
    export const listScansToolHandler = async () => {
      try {
        // Get all scans
        const scans = await listScans();
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(scans, null, 2)
            }
          ]
        };
      } catch (error) {
        const mcpError = handleNessusApiError(error);
        return {
          content: [
            {
              type: 'text',
              text: `Error: ${mcpError.message}`
            }
          ],
          isError: true
        };
      }
    };
  • The schema definition for the 'list_scans' tool, specifying its name, description, and empty input schema since it takes no parameters.
    export const listScansToolSchema = {
      name: 'list_scans',
      description: 'List all scans and their status',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • src/index.ts:105-106 (registration)
    Registration of the 'list_scans' tool handler in the main tool call switch statement in the MCP server's CallToolRequestHandler.
    case 'list_scans':
      return await listScansToolHandler();
  • src/index.ts:75-83 (registration)
    Registration of the 'list_scans' tool schema (line 80) in the ListToolsRequestHandler response array.
    tools: [
      listScanTemplatesToolSchema,
      startScanToolSchema,
      getScanStatusToolSchema,
      getScanResultsToolSchema,
      listScansToolSchema,
      getVulnerabilityDetailsToolSchema,
      searchVulnerabilitiesToolSchema
    ]
  • Helper function listScans() that provides the actual logic to list scans, using mock data or throwing for real API.
    export const listScans = async () => {
      if (config.useMock) {
        const scans = Array.from(mockScans.values()).map(scan => ({
          id: scan.id,
          target: scan.target,
          type: scan.type,
          status: scan.status,
          created: scan.created
        }));
    
        return { scans };
      }
    
      // Real API implementation would go here
      throw new Error("Real API not implemented");
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does without disclosing behavioral traits like pagination, rate limits, or authentication needs. It's minimal and doesn't add meaningful context beyond the basic operation.

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 with zero waste. It's appropriately sized and front-loaded, making it easy to understand quickly without unnecessary details.

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 (0 parameters, no output schema), the description is adequate but has clear gaps. It lacks behavioral context and usage guidelines, which are needed for a tool with siblings, making it minimally viable but incomplete.

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

Parameters4/5

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

Since there are 0 parameters and schema description coverage is 100%, the baseline is high. The description doesn't need to compensate for missing param info, and it accurately reflects the lack of inputs by not mentioning any.

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 verb ('List') and resource ('all scans and their status'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_scan_status' or 'list_scan_templates', 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 like 'get_scan_status' or 'search_vulnerabilities'. It lacks explicit context or exclusions, leaving usage decisions unclear.

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

Related 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/Cyreslab-AI/nessus-mcp-server'

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