get_newest_cves
Fetches recent vulnerabilities from the CVE database, enabling cybersecurity researchers to stay informed about emerging threats and manage risk effectively.
Instructions
Get the newest vulnerabilities from the CVE database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 10) |
Implementation Reference
- src/index.ts:749-763 (handler)Core handler function in CVEDBClient that fetches the newest CVEs from the CVEDB API endpoint '/cves' with a limit parameter.try { const response = await this.axiosInstance.get("/cves", { params: { limit } }); return response.data; } catch (error: unknown) { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `CVEDB API error: ${error.response?.data?.error || error.message}` ); } throw error; } }
- src/index.ts:1926-1946 (handler)MCP server tool handler for 'get_newest_cves' that parses input, calls CVEDBClient.getNewestCves, and formats the JSON response.case "get_newest_cves": { const limit = request.params.arguments?.limit ? Number(request.params.arguments.limit) : 10; try { const newestCves = await cvedbClient.getNewestCves(limit); return { content: [{ type: "text", text: JSON.stringify(newestCves, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error getting newest CVEs: ${(error as Error).message}` ); } }
- src/index.ts:1240-1251 (registration)Tool registration in ListToolsRequestSchema handler, including name, description, and input schema definition.name: "get_newest_cves", description: "Get the newest vulnerabilities from the CVE database", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of results to return (default: 10)" } } } },
- src/index.ts:1240-1251 (schema)Input schema definition for the 'get_newest_cves' tool.name: "get_newest_cves", description: "Get the newest vulnerabilities from the CVE database", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of results to return (default: 10)" } } } },