get_cves_by_epss
Retrieve Common Vulnerabilities and Exposures (CVEs) sorted by EPSS score to prioritize cybersecurity risks based on exploit likelihood. Set limits to customize the number of results returned.
Instructions
Get CVEs sorted by EPSS score (Exploit Prediction Scoring System)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 10) |
Implementation Reference
- src/index.ts:1970-1991 (handler)Main handler for the get_cves_by_epss tool within the CallToolRequestSchema request handler. Extracts the optional 'limit' parameter, invokes the CVEDB client's getCvesByEpss method, formats the response as JSON text content, and handles errors.case "get_cves_by_epss": { const limit = request.params.arguments?.limit ? Number(request.params.arguments.limit) : 10; try { const epssCves = await cvedbClient.getCvesByEpss(limit); return { content: [{ type: "text", text: JSON.stringify(epssCves, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error getting CVEs by EPSS: ${(error as Error).message}` ); } }
- src/index.ts:787-804 (helper)Core helper method in CVEDBClient class that performs the actual API call to CVEDB /cves endpoint with 'sort_by_epss: true' and 'limit' parameters to fetch CVEs sorted by EPSS score.*/ async getCvesByEpss(limit: number = 10): Promise<any> { try { const response = await this.axiosInstance.get("/cves", { params: { sort_by_epss: true, 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:1266-1277 (registration)Tool registration entry in the ListToolsRequestSchema handler's tools array. Defines the tool name, description, and input schema for validation.name: "get_cves_by_epss", description: "Get CVEs sorted by EPSS score (Exploit Prediction Scoring System)", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of results to return (default: 10)" } } } }
- src/index.ts:1269-1277 (schema)Input schema definition for the get_cves_by_epss tool, specifying the optional 'limit' parameter as a number.type: "object", properties: { limit: { type: "number", description: "Maximum number of results to return (default: 10)" } } } }