Skip to main content
Glama
jamiesonio

DefectDojo MCP Server

by jamiesonio

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'pagination support' which is useful, but doesn't describe other critical behaviors: authentication requirements, rate limits, error conditions, or what the output contains. For a search tool with 6 parameters, this leaves significant gaps in understanding how it operates.

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

Conciseness5/5

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

The description is extremely concise at just one sentence with zero wasted words. It's front-loaded with the core purpose and includes key behavioral information (pagination support) efficiently. Every element earns its place without redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool has 6 parameters with 0% schema description coverage and an output schema exists, the description is moderately complete. The output schema reduces the need to describe return values, but the description still lacks sufficient context about parameter usage, behavioral constraints, and differentiation from siblings. It's adequate but has clear gaps for a search tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only mentions 'text query' and 'pagination support', which partially covers the 'query', 'limit', and 'offset' parameters. However, it doesn't address 'product_name', 'severity', or 'status' parameters at all, leaving half the parameters without semantic context.

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: 'Search for findings using a text query with pagination support'. It specifies the verb ('search'), resource ('findings'), and key features (text query, pagination). However, it doesn't explicitly differentiate from sibling tools like 'get_findings' or 'list_engagements', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_findings' and 'list_engagements' available, there's no indication of when this search tool is preferred over simpler retrieval tools or how it differs in functionality. The mention of 'pagination support' hints at use for large result sets but isn't explicit.

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

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