Skip to main content
Glama
jamiesonio

DefectDojo MCP Server

by jamiesonio

list_engagements

Retrieve and filter engagements in DefectDojo with pagination options to manage vulnerability assessment workflows efficiently.

Instructions

List engagements with optional filtering and pagination support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
nameNo
offsetNo
product_idNo
statusNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that implements the tool logic: fetches engagements from DefectDojo API with filters for product, status, name, pagination; includes validation and error handling.
    async def list_engagements(product_id: Optional[int] = None,
                              status: Optional[str] = None,
                              name: Optional[str] = None,
                              limit: int = 20, offset: int = 0) -> Dict[str, Any]:
        """List engagements with optional filtering and pagination.
    
        Args:
            product_id: Optional product ID filter
            status: Optional status filter (e.g., 'Not Started', 'In Progress', 'Completed')
            name: Optional name filter (partial match)
            limit: Maximum number of engagements to return per page (default: 20)
            offset: Number of records to skip (default: 0)
    
        Returns:
            Dictionary with status, data/error, and pagination metadata
        """
        filters = {"limit": limit}
        if product_id:
            filters["product"] = product_id
        if status:
             # Validate against known API statuses if necessary
            valid_statuses = ["Not Started", "Blocked", "Cancelled", "Completed", "In Progress", "On Hold", "Waiting for Resource"]
            if status not in valid_statuses:
                 return {"status": "error", "error": f"Invalid status filter '{status}'. Must be one of: {', '.join(valid_statuses)}"}
            filters["status"] = status
        if name:
            filters["name"] = name # Or name__icontains if supported
        if offset:
            filters["offset"] = offset
    
        client = get_client()
        result = await client.get_engagements(filters)
    
        if "error" in result:
            return {"status": "error", "error": result["error"], "details": result.get("details", "")}
    
        return {"status": "success", "data": result}
  • Registers the 'list_engagements' tool with the FastMCP instance, specifying name and description, binding it to the handler function.
    mcp.tool(
        name="list_engagements",
        description="List engagements with optional filtering and pagination support"
    )(list_engagements)
Behavior2/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. While it mentions filtering and pagination support, it doesn't describe important behavioral aspects like whether this is a read-only operation, what authentication is required, rate limits, what happens with invalid filters, or the structure of returned data. The description is minimal and leaves significant behavioral questions unanswered.

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 8 words, front-loading the core purpose ('List engagements') followed by key capabilities. Every word earns its place, with no wasted language or redundancy. The structure moves from primary action to supporting features efficiently.

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 that there's an output schema (which handles return values) and no annotations, the description provides the bare minimum for a listing tool. However, for a tool with 5 parameters and 0% schema description coverage, it should do more to explain filtering options and pagination behavior. The description is complete enough to understand the basic purpose but inadequate for optimal tool selection and usage.

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?

With 0% schema description coverage and 5 parameters, the description provides minimal parameter information. It mentions 'optional filtering and pagination support' which hints at some parameters, but doesn't explain what specific filters are available (name, product_id, status) or how pagination works (limit, offset). The description doesn't adequately compensate for the complete lack of schema descriptions.

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 verb ('List') and resource ('engagements'), making the purpose immediately understandable. It distinguishes from sibling tools like 'get_engagement' (singular) and 'create_engagement' by focusing on listing multiple items. However, it doesn't explicitly differentiate from 'search_findings' or 'list_products' in terms of resource scope.

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 mentions 'optional filtering and pagination support' which implies some usage context, but provides no explicit guidance on when to use this tool versus alternatives like 'search_findings' or 'get_engagement'. There's no mention of prerequisites, typical use cases, or when not to use this tool.

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