Skip to main content
Glama

get_cve_info

Retrieve comprehensive details about a specific CVE to analyze vulnerabilities and enhance cybersecurity threat intelligence using Shodan API functionality.

Instructions

Get detailed information about a specific CVE

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cve_idYesCVE ID to look up (e.g., 'CVE-2021-44228')

Implementation Reference

  • Primary MCP tool handler for 'get_cve_info': validates input cve_id, calls CVEDBClient.getCveInfo, and formats response as JSON text.
    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}` ); } }
  • Core implementation of CVE info retrieval: makes HTTP GET to CVEDB API /cve/{cveId}, handles 404 not found, and propagates other errors.
    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:1156-1168 (registration)
    Tool registration in ListTools handler: defines name, description, and input schema requiring 'cve_id' string.
    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"] } },
  • Instantiates the CVEDBClient instance used by the get_cve_info tool handler.
    // Create CVEDB client const cvedbClient = new CVEDBClient();
  • CVEDBClient constructor: configures Axios client with CVEDB base URL.
    constructor() { this.axiosInstance = axios.create({ baseURL: "https://cvedb.shodan.io" }); }

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/shodan-mcp-server'

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