Skip to main content
Glama
roadwy

cve-search_mcp

vul_last_cves

Retrieve JSON data of recent CVEs, including CAPEC, CWE, and CPE details, by specifying the number of entries to fetch.

Instructions

To get a JSON of the last <number> (5 by default) CVEs including CAPEC, CWE and CPE expansions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberNo

Implementation Reference

  • main.py:63-69 (handler)
    The handler function for the 'vul_last_cves' tool. It constructs the API URI for the last N CVEs and calls the get_requests helper to fetch the data from the CVE search API.
    @mcp.tool()
    def vul_last_cves(number: int = 5) -> List[Dict[str, Any]]:
        """
        To get a JSON of the last <number> (5 by default) CVEs including CAPEC, CWE and CPE expansions
        """
        uri = f"last/{number}"
        return get_requests(uri)
  • main.py:15-26 (helper)
    Helper function used by vul_last_cves (and other tools) to make HTTP GET requests to the CVE API, handling errors and returning JSON or error dict.
    def get_requests(uri: str) -> Dict[str, Any]:
        """To get a JSON with all the requests"""
        session = requests.Session()
        url = f"{BASE_URL}{uri}"
        try:
            response = session.get(url, timeout=15)
            response.raise_for_status()
            return response.json()
        except requests.exceptions.RequestException as e:
            logger.error(f"api request failed: {url} - {str(e)}")
            return {"error": str(e)}
  • main.py:63-63 (registration)
    The @mcp.tool() decorator registers the vul_last_cves function as an MCP tool.
    @mcp.tool()

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

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/roadwy/cve-search_mcp'

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