Skip to main content
Glama

get_newest_cves

Retrieve recently published vulnerabilities from the CVE database to identify potential security threats and prioritize patching efforts.

Instructions

Get the newest vulnerabilities from the CVE database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • MCP CallToolRequestSchema handler case for 'get_newest_cves' tool. Parses optional 'limit' parameter, invokes CVEDBClient.getNewestCves(), formats and returns JSON response, handles errors.
    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}` ); } }
  • Core implementation in CVEDBClient class: makes HTTP GET request to 'https://cvedb.shodan.io/cves?limit=N' to fetch newest CVEs, returns response data, handles API errors.
    async getNewestCves(limit: number = 10): Promise<any> { 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:1240-1251 (registration)
    Tool registration entry in ListToolsRequestSchema response array defining name, description, and input schema for 'get_newest_cves'.
    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)" } } } },
  • Input schema definition for 'get_newest_cves' tool: optional 'limit' number parameter.
    inputSchema: { 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