list_scan_templates
Retrieve available Nessus scan templates to configure and execute vulnerability assessments effectively using the MCP server.
Instructions
List available Nessus scan templates
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/scans.ts:32-55 (handler)The handler function that executes the list_scan_templates tool. It calls getScanTemplates() from the Nessus API and returns the formatted list or handles errors.export const listScanTemplatesToolHandler = async () => { try { const templates = await getScanTemplates(); return { content: [ { type: 'text', text: JSON.stringify(templates, null, 2) } ] }; } catch (error) { const mcpError = handleNessusApiError(error); return { content: [ { type: 'text', text: `Error: ${mcpError.message}` } ], isError: true }; } };
- src/tools/scans.ts:23-30 (schema)The schema definition for the list_scan_templates tool, specifying name, description, and empty input schema (no parameters required).export const listScanTemplatesToolSchema = { name: 'list_scan_templates', description: 'List available Nessus scan templates', inputSchema: { type: 'object', properties: {} } };
- src/index.ts:97-98 (registration)Registration and dispatch of the list_scan_templates handler in the main tool call switch statement.case 'list_scan_templates': return await listScanTemplatesToolHandler();
- src/index.ts:76-76 (registration)Registration of the list_scan_templates schema in the listTools response.listScanTemplatesToolSchema,