Skip to main content
Glama
zoomeye-ai

ZoomEye MCP Server

Official
by zoomeye-ai

zoomeye_vuldb_by_keyword

Query ZoomEye's vulnerability database to discover security vulnerabilities linked to specific products or vendors. Retrieve details like CVE IDs, severity ratings, affected versions, and descriptions using targeted keywords.

Instructions

Search ZoomEye's vulnerability database for security vulnerabilities based on a specified keyword.

This function queries the ZoomEye vulnerability database to retrieve information about known security vulnerabilities associated with specific products, vendors. Results include vulnerability details such as CVE IDs, severity ratings, affected versions, and vulnerability descriptions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesSearch term to query the vulnerability database. This can be a product name, vendor name (e.g., "nginx", "mysql", "tomcat", "WordPress", "hikvision", "huawei").
page_sizeNoNumber of records per page, default is 10, maximum is 100.

Implementation Reference

  • Core implementation of the zoomeye_vuldb_by_keyword tool: queries ZoomEye vulnerability database by keyword via API GET request to /v2/search/vuldb
    async def query_vulnerability_by_keyword(self, keyword: str, page_size: int = 10): """Query vulnerability by keyword. Args: keyword (str): The keyword 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/search/vuldb" 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, params={"search": keyword, "page_size": page_size}) response.raise_for_status() # Raise exception for HTTP errors return response.json() except httpx.HTTPError as e: import traceback traceback.print_exc() raise ValueError(f"Error querying ZoomEye API: {str(e)}") except json.JSONDecodeError: raise ValueError("Invalid JSON response from ZoomEye API")
  • Tool registration in the MCP server's list_tools(), including name, description, and input schema.
    Tool( name=ZoomeyeTools.ZOOMEYE_VULDB_BY_KEYWORD, description="""Search ZoomEye's vulnerability database for security vulnerabilities based on a specified keyword. This function queries the ZoomEye vulnerability database to retrieve information about known security vulnerabilities associated with specific products, vendors. Results include vulnerability details such as CVE IDs, severity ratings, affected versions, and vulnerability descriptions.""", inputSchema={ "type": "object", "properties": { "keyword": { "type": "string", "description": """Search term to query the vulnerability database. This can be a product name, vendor name (e.g., "nginx", "mysql", "tomcat", "WordPress", "hikvision", "huawei").""", }, "page_size": { "type": "integer", "description": "Number of records per page, default is 10, maximum is 100.", "default": 10, "maximum": 100 } }, "required": ["keyword"], }, )
  • Dispatch handler in call_tool() that extracts arguments and invokes the ZoomeyeService method for this tool.
    case ZoomeyeTools.ZOOMEYE_VULDB_BY_KEYWORD: keyword = arguments.get("keyword") if not keyword: raise ValueError("Missing required argument: keyword") result = await zoomeye_service.query_vulnerability_by_keyword(keyword)
  • Input schema definition for the tool, specifying parameters keyword (required) and page_size.
    inputSchema={ "type": "object", "properties": { "keyword": { "type": "string", "description": """Search term to query the vulnerability database. This can be a product name, vendor name (e.g., "nginx", "mysql", "tomcat", "WordPress", "hikvision", "huawei").""", }, "page_size": { "type": "integer", "description": "Number of records per page, default is 10, maximum is 100.", "default": 10, "maximum": 100 } }, "required": ["keyword"], },
  • Enum constant defining the tool name in ZoomeyeTools.
    ZOOMEYE_VULDB_BY_KEYWORD = "zoomeye_vuldb_by_keyword" """Query vulnerability by keyword."""

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