Skip to main content
Glama
malloryai

Mallory MCP Server

Official
by malloryai

get_vulnerabilities

Search and filter vulnerability data from the Mallory MCP Server database to identify security risks, track trends, and generate reports based on CVE IDs, descriptions, severity scores, or technologies.

Instructions

Get vulnerabilities

Use this tool when you need to search or browse multiple vulnerabilities, such as when:

  • Discovering recently added vulnerabilities in the database

  • Searching for vulnerabilities by keywords in their descriptions

  • Finding all vulnerabilities related to a specific technology

  • Creating reports on vulnerability trends or statistics

  • Looking for high-severity vulnerabilities based on CVSS or EPSS scores

Args: filter (str, optional): A string used to filter vulnerabilities. It can start with specific prefixes: * cve:: Filter by CVE ID. * uuid:: Filter by UUID. * desc:: Filter by description. * If the filter string matches the pattern CVE- or a UUID pattern, it will be treated as a specific filter. * If no prefix is provided, it defaults to a description filter. Defaults to "". offset (int, optional): The number of items to skip before starting to collect the result set. Defaults to 0. limit (int, optional): The maximum number of items to return. Minimum value is 1. Defaults to 10 (API default is 100). sort (str, optional): Field to sort by - either 'cve_id', 'created_at', 'updated_at', 'cvss_3_base_score', 'epss_score', or 'epss_percentile'. Defaults to 'created_at'. order (str, optional): Sort order - either 'asc' or 'desc'. Defaults to 'desc'.

Returns: Dict[str, Any]: Dictionary containing: - total: Total number of vulnerabilities matching the filter criteria - offset: Current pagination offset - limit: Number of items returned per page - message: Status message (usually null when successful) - data: List of vulnerability records, each containing: - uuid: Unique identifier for the vulnerability - cve_id: The CVE identifier - description: Detailed description of the vulnerability - created_at/updated_at: Timestamps for record creation and updates - cvss_base_score: Severity score (if available) - cvss_version: Version of the CVSS scoring system used - cvss_vector: Detailed scoring vector - cvss_data: Additional CVSS scoring information - epss_score: Exploit Prediction Scoring System score - epss_percentile: Percentile ranking of the EPSS score - cisa_kev_added_at: Date added to CISA's Known Exploited Vulnerabilities catalog - gen_description/gen_name: Generated content (if available)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
offsetNo
limitNo
sortNocreated_at
orderNodesc

Implementation Reference

  • The @mcp.tool() decorator registers the get_vulnerabilities function as an MCP tool.
    @mcp.tool()
    @handle_api_errors
  • The handler function that implements the logic for the get_vulnerabilities MCP tool by calling the malloryai_client to list vulnerabilities with filtering, pagination, sorting, and ordering parameters.
    async def get_vulnerabilities(
        filter: str = "",
        offset: int = 0,
        limit: int = 10,
        sort: str = "created_at",
        order: str = "desc",
    ) -> Dict[str, Any]:
        """Get vulnerabilities
    
        Use this tool when you need to search or browse multiple vulnerabilities, such as when:
        - Discovering recently added vulnerabilities in the database
        - Searching for vulnerabilities by keywords in their descriptions
        - Finding all vulnerabilities related to a specific technology
        - Creating reports on vulnerability trends or statistics
        - Looking for high-severity vulnerabilities based on CVSS or EPSS scores
    
        Args:
            filter (str, optional): A string used to filter vulnerabilities. It can start with specific prefixes:
                * `cve:`: Filter by CVE ID.
                * `uuid:`: Filter by UUID.
                * `desc:`: Filter by description.
                * If the filter string matches the pattern `CVE-` or a UUID pattern, it will be treated as a specific filter.
                * If no prefix is provided, it defaults to a description filter.
                Defaults to "".
            offset (int, optional): The number of items to skip before starting to collect the result set.
                Defaults to 0.
            limit (int, optional): The maximum number of items to return. Minimum value is 1.
                Defaults to 10 (API default is 100).
            sort (str, optional): Field to sort by - either 'cve_id', 'created_at', 'updated_at',
                'cvss_3_base_score', 'epss_score', or 'epss_percentile'.
                Defaults to 'created_at'.
            order (str, optional): Sort order - either 'asc' or 'desc'.
                Defaults to 'desc'.
    
        Returns:
            Dict[str, Any]: Dictionary containing:
                - total: Total number of vulnerabilities matching the filter criteria
                - offset: Current pagination offset
                - limit: Number of items returned per page
                - message: Status message (usually null when successful)
                - data: List of vulnerability records, each containing:
                    - uuid: Unique identifier for the vulnerability
                    - cve_id: The CVE identifier
                    - description: Detailed description of the vulnerability
                    - created_at/updated_at: Timestamps for record creation and updates
                    - cvss_base_score: Severity score (if available)
                    - cvss_version: Version of the CVSS scoring system used
                    - cvss_vector: Detailed scoring vector
                    - cvss_data: Additional CVSS scoring information
                    - epss_score: Exploit Prediction Scoring System score
                    - epss_percentile: Percentile ranking of the EPSS score
                    - cisa_kev_added_at: Date added to CISA's Known Exploited Vulnerabilities catalog
                    - gen_description/gen_name: Generated content (if available)
        """
        return await malloryai_client.vulnerabilities.list_vulnerabilities(
            filter=filter, offset=offset, limit=limit, sort=sort, order=order
        )
  • Dynamic registration mechanism that imports the tools/vulnerabilities.py module, triggering the @mcp.tool() registration of get_vulnerabilities.
    def load_tools():
        """Dynamically load all tool modules in the tools package"""
        # Get the tools directory
        tools_dir = Path(__file__).resolve().parent.parent / "tools"
    
        # Find all Python modules in the tools directory
        for _, module_name, _ in pkgutil.iter_modules([str(tools_dir)]):
            # Skip the __init__ module
            if module_name != "__init__":
                # Import the module
                importlib.import_module(f"malloryai.mcp.tools.{module_name}")
                debug_log(f"Loaded tool: {module_name}")
    
    
    def initialize_server():
        """Initialize the server by loading all tools"""
        try:
            debug_log("Starting tool loading...")
            load_tools()
            debug_log("Tools loaded successfully")
            return mcp
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and does so well. It explains the pagination behavior (offset/limit), sorting capabilities, filtering logic with prefix rules, and provides detailed return structure. The only minor gap is not mentioning rate limits or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, args, returns) and efficiently conveys necessary information. While comprehensive, it maintains good information density with minimal redundancy. The only minor improvement would be slightly tighter phrasing in the usage scenarios section.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, 0% schema description coverage, no annotations, and no output schema, the description provides exceptional completeness. It covers purpose, usage guidelines, detailed parameter semantics, and comprehensive return value documentation, making this fully self-contained for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing comprehensive parameter documentation. It explains all 5 parameters in detail, including filter prefixes (cve:, uuid:, desc:), offset/limit pagination logic, sort field options, and order direction. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get vulnerabilities' and 'search or browse multiple vulnerabilities', which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'find_vulnerability' (singular vs plural), leaving some ambiguity about when to use one over the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides excellent usage guidelines with five specific scenarios when to use this tool, including discovering recent vulnerabilities, searching by keywords, finding technology-specific vulnerabilities, creating reports, and looking for high-severity vulnerabilities. This gives clear context for when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/malloryai/mallory-mcp-server'

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