Skip to main content
Glama

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
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • 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}` ); } }
  • 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)" } } } }
  • 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)" } } } }

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