get_cve_info
Retrieve detailed vulnerability information for a specific CVE ID to support cybersecurity research and threat intelligence analysis.
Instructions
Get detailed information about a specific CVE
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cve_id | Yes | CVE ID to look up (e.g., 'CVE-2021-44228') |
Implementation Reference
- src/index.ts:1813-1839 (handler)Main handler for the 'get_cve_info' tool in the CallToolRequestSchema switch statement. Validates the 'cve_id' argument and delegates to cvedbClient.getCveInfo().case "get_cve_info": { const cveId = String(request.params.arguments?.cve_id); if (!cveId) { throw new McpError( ErrorCode.InvalidParams, "CVE ID is required" ); } try { const cveInfo = await cvedbClient.getCveInfo(cveId); return { content: [{ type: "text", text: JSON.stringify(cveInfo, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error getting CVE info: ${(error as Error).message}` ); } }
- src/index.ts:653-672 (helper)Core implementation of CVE information retrieval in CVEDBClient class. Makes API call to https://cvedb.shodan.io/cve/{cveId} and handles errors like 404.async getCveInfo(cveId: string): Promise<any> { try { const response = await this.axiosInstance.get(`/cve/${cveId}`); return response.data; } catch (error: unknown) { if (axios.isAxiosError(error)) { if (error.response?.status === 404) { return { error: "CVE not found", message: `CVE ${cveId} was not found in the database.`, status: 404 }; } throw new McpError( ErrorCode.InternalError, `CVEDB API error: ${error.response?.data?.error || error.message}` ); } throw error; }
- src/index.ts:1155-1168 (registration)Tool registration in ListToolsRequestSchema response. Defines name, description, and input schema for 'get_cve_info'.{ name: "get_cve_info", description: "Get detailed information about a specific CVE", inputSchema: { type: "object", properties: { cve_id: { type: "string", description: "CVE ID to look up (e.g., 'CVE-2021-44228')" } }, required: ["cve_id"] } },
- src/index.ts:1158-1166 (schema)Input schema definition for the 'get_cve_info' tool, specifying required 'cve_id' string parameter.inputSchema: { type: "object", properties: { cve_id: { type: "string", description: "CVE ID to look up (e.g., 'CVE-2021-44228')" } }, required: ["cve_id"]