Skip to main content
Glama
jamiesonio

DefectDojo MCP Server

by jamiesonio

close_engagement

Terminate an engagement in DefectDojo by specifying its ID using this MCP server tool. Simplifies vulnerability management workflows by programmatically closing engagements.

Instructions

Close an engagement

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engagement_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function that implements the 'close_engagement' tool by updating the engagement's status to 'Completed' via the DefectDojo API client.
    async def close_engagement(engagement_id: int) -> Dict[str, Any]:
        """Close an engagement by setting its status to completed.
    
        Args:
            engagement_id: ID of the engagement to close
    
        Returns:
            Dictionary with status and data/error
        """
        # Use the specific status string from the API schema
        data = {
            "status": "Completed"
        }
    
        client = get_client()
        # Use the update_engagement client method
        result = await client.update_engagement(engagement_id, data)
    
        if "error" in result:
            return {"status": "error", "error": result["error"], "details": result.get("details", "")}
    
        # Check if the update was successful (API might return updated object or just status)
        # Assuming success if no error is present
        return {"status": "success", "data": result}
  • The primary registration of the 'close_engagement' tool with the MCP server instance in the central tools.py file.
    mcp.tool(
        name="close_engagement",
        description="Close an engagement"
    )(close_engagement)
  • Secondary or module-local registration of the 'close_engagement' tool within the engagements_tools.py module.
    mcp.tool(name="close_engagement", description="Close an engagement")(close_engagement)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Close an engagement' implies a mutation, but it does not specify if this is reversible, what permissions are required, or any side effects like data archiving. This leaves critical behavioral traits undisclosed for a tool that likely alters state.

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 extremely concise with a single sentence, 'Close an engagement', which is front-loaded and wastes no words. However, this brevity borders on under-specification, as it omits necessary details, though it is structurally efficient.

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

Completeness2/5

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

Given the tool likely performs a mutation (closing an engagement) with no annotations, 0% schema coverage, and an output schema present (which may help), the description is incomplete. It does not address behavioral risks, parameter usage, or differentiation from siblings, failing to provide adequate context for safe and correct invocation.

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 the undocumented parameter 'engagement_id'. However, it adds no meaning beyond the schema, failing to explain what an engagement ID is, how to obtain it, or its format, leaving the parameter's semantics unclear.

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

Purpose2/5

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

The description 'Close an engagement' restates the tool name with minimal expansion, making it tautological. It specifies the verb 'close' and resource 'engagement' but lacks detail on what closing entails or how it differs from siblings like 'update_engagement' or 'get_engagement', leaving the purpose vague.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'update_engagement' and 'get_engagement', the description does not indicate prerequisites, such as needing an existing engagement, or exclusions, like when not to close an engagement, offering minimal context for selection.

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