Skip to main content
Glama

get_vulnerability_details

Retrieve comprehensive details about a specific vulnerability by providing its unique ID, such as CVE identifiers, using the Nessus MCP Server for advanced security insights.

Instructions

Get detailed information about a specific vulnerability

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vulnerability_idYesID of the vulnerability (e.g., CVE-2021-44228)

Implementation Reference

  • The primary handler function that executes the get_vulnerability_details tool logic, including input validation, API call to fetch details, formatting, and error handling.
    export const getVulnerabilityDetailsToolHandler = async (args: Record<string, unknown>) => { try { // Validate arguments const vulnId = validateVulnerabilityId(args.vulnerability_id); // Get vulnerability details const details = await getVulnerabilityDetails(vulnId); // Check if there was an error if ('error' in details) { return { content: [ { type: 'text', text: `Error: ${details.error}` } ], isError: true }; } // Format the vulnerability details const formattedDetails = formatVulnerabilityDetails(details); return { content: [ { type: 'text', text: formattedDetails } ] }; } catch (error) { const mcpError = handleNessusApiError(error); return { content: [ { type: 'text', text: `Error: ${mcpError.message}` } ], isError: true }; } };
  • Defines the input schema and metadata for the get_vulnerability_details tool.
    export const getVulnerabilityDetailsToolSchema = { name: 'get_vulnerability_details', description: 'Get detailed information about a specific vulnerability', inputSchema: { type: 'object', properties: { vulnerability_id: { type: 'string', description: 'ID of the vulnerability (e.g., CVE-2021-44228)' } }, required: ['vulnerability_id'] } };
  • src/index.ts:107-108 (registration)
    Registers and dispatches the get_vulnerability_details tool handler in the main CallToolRequestSchema switch statement.
    case 'get_vulnerability_details': return await getVulnerabilityDetailsToolHandler(args);
  • src/index.ts:71-86 (registration)
    Registers the tool schema in the ListToolsRequestSchema handler, making it discoverable.
    server.setRequestHandler( ListToolsRequestSchema, async () => { return { tools: [ listScanTemplatesToolSchema, startScanToolSchema, getScanStatusToolSchema, getScanResultsToolSchema, listScansToolSchema, getVulnerabilityDetailsToolSchema, searchVulnerabilitiesToolSchema ] }; } );
  • Supporting function called by the handler to retrieve raw vulnerability details from mock data or real Nessus API.
    export const getVulnerabilityDetails = async (vulnId: string) => { if (config.useMock) { return getMockVulnerabilityDetails(vulnId); } // Real API implementation would go here throw new Error("Real API not implemented"); };

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