Skip to main content
Glama
zoomeye-ai

ZoomEye MCP Server

Official
by zoomeye-ai

zoomeye_vuldb_by_id

Retrieve comprehensive vulnerability details by entering a CVE, CNVD, or CNNVD ID. This tool queries the ZoomEye API to provide formatted security data for analysis.

Instructions

Search for detailed vulnerability information by vulnerability ID and return formatted results.

Use this tool to retrieve comprehensive security vulnerability details from the vulnerability database using a vulnerability identifier (CVE, CNVD, CNNVD). Results include:

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cve_idYesA valid vulnerability identifier, eg: CVE-XXXX-XXXX,CNVD-XXXX-XXXX,CNNVD-XXXX-XXXX

Implementation Reference

  • Core handler function in ZoomeyeService that implements the tool logic by querying the ZoomEye vulnerability database API using the provided CVE ID.
    async def query_vulnerability_by_id(self, cve_id: str): """Query vulnerability by ID. Args: cve_id (str): The CVE ID to query. Returns: dict: The API response data. Raises: ValueError: If API key is not provided or API request fails. """ url = "https://api.zoomeye.ai/v2/vuldb/{}".format(cve_id) headers = {"API-KEY": self.key, "Content-Type": "application/json"} try: client = await self.get_client() async with client: response = await client.get(url, headers=headers) response.raise_for_status() # Raise exception for HTTP errors return response.json() except httpx.HTTPError as e: raise ValueError(f"Error querying ZoomEye API: {str(e)}") except json.JSONDecodeError: raise ValueError("Invalid JSON response from ZoomEye API")
  • Input schema definition for the zoomeye_vuldb_by_id tool, specifying the required 'cve_id' parameter.
    inputSchema={ "type": "object", "properties": { "cve_id": { "type": "string", "description": "A valid vulnerability identifier, eg: CVE-XXXX-XXXX,CNVD-XXXX-XXXX,CNNVD-XXXX-XXXX", } }, "required": ["cve_id"], },
  • Registration of the zoomeye_vuldb_by_id tool in the MCP server list_tools function.
    Tool( name=ZoomeyeTools.ZOOMEYE_VULDB_BY_ID, description="""Search for detailed vulnerability information by vulnerability ID and return formatted results. Use this tool to retrieve comprehensive security vulnerability details from the vulnerability database using a vulnerability identifier (CVE, CNVD, CNNVD). Results include:""", inputSchema={ "type": "object", "properties": { "cve_id": { "type": "string", "description": "A valid vulnerability identifier, eg: CVE-XXXX-XXXX,CNVD-XXXX-XXXX,CNNVD-XXXX-XXXX", } }, "required": ["cve_id"], }, ),
  • Dispatch handler in call_tool that extracts arguments and calls the core query_vulnerability_by_id method.
    case ZoomeyeTools.ZOOMEYE_VULDB_BY_ID: cve_id = arguments.get("cve_id") if not cve_id: raise ValueError("Missing required argument: cve_id") result = await zoomeye_service.query_vulnerability_by_id(cve_id)
  • Enum constant defining the tool name string.
    ZOOMEYE_VULDB_BY_ID = "zoomeye_vuldb_by_id"

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/zoomeye-ai/mcp_zoomeye'

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