Skip to main content
Glama

search_findings

Query and filter findings in vulnerability management using text, status, severity, and product name, with pagination support for efficient results navigation.

Instructions

Search for findings using a text query with pagination support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
product_nameNo
queryYes
severityNo
statusNo

Implementation Reference

  • The handler function that implements the core logic of the 'search_findings' tool. It constructs filters from input parameters, retrieves the DefectDojo client, performs the search, and returns formatted results or errors.
    async def search_findings(query: str, product_name: Optional[str] = None, status: Optional[str] = None, severity: Optional[str] = None, limit: int = 20, offset: int = 0) -> Dict[str, Any]: """Search for findings using a text query with pagination. Args: query: Text to search for in findings product_name: Optional product name filter status: Optional status filter severity: Optional severity filter limit: Maximum number of findings to return per page (default: 20) offset: Number of records to skip (default: 0) Returns: Dictionary with status, data/error, and pagination metadata """ filters = {} if product_name: filters["product_name"] = product_name if status: filters["status"] = status if severity: filters["severity"] = severity if limit: filters["limit"] = limit if offset: filters["offset"] = offset client = get_client() result = await client.search_findings(query, filters) if "error" in result: return {"status": "error", "error": result["error"], "details": result.get("details", "")} return {"status": "success", "data": result}
  • Registers the 'search_findings' tool with the MCP server instance, binding the handler function imported from findings_tools.py.
    mcp.tool( name="search_findings", description="Search for findings using a text query with pagination support" )(search_findings)
  • Helper method in the DefectDojoClient class that appends the search query to filters and makes the API request to retrieve search results for findings.
    async def search_findings(self, query: str, filters: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: """Search for findings using a text query.""" params = filters or {} params["search"] = query return await self._request("GET", "/api/v2/findings/", params=params)

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/jamiesonio/defectdojo-mcp'

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