get_engagement
Retrieve specific engagement details by ID from DefectDojo, enabling efficient vulnerability management and programmatic interaction with engagement data.
Instructions
Get a specific engagement by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engagement_id | Yes |
Implementation Reference
- The main handler function for the 'get_engagement' tool. It retrieves the engagement using the DefectDojo client and formats the response.async def get_engagement(engagement_id: int) -> Dict[str, Any]: """Get a specific engagement by ID. Args: engagement_id: ID of the engagement to retrieve Returns: Dictionary with status and data/error """ client = get_client() result = await client.get_engagement(engagement_id) if "error" in result: return {"status": "error", "error": result["error"], "details": result.get("details", "")} return {"status": "success", "data": result}
- src/defectdojo/tools.py:69-72 (registration)Registration of the 'get_engagement' tool with the MCP server in the central tools.py file.mcp.tool( name="get_engagement", description="Get a specific engagement by ID" )(get_engagement)
- src/defectdojo/client.py:74-76 (helper)Low-level client method that performs the actual API request for getting an engagement.async def get_engagement(self, engagement_id: int) -> Dict[str, Any]: """Get a specific engagement by ID.""" return await self._request("GET", f"/api/v2/engagements/{engagement_id}/")
- src/defectdojo/engagements_tools.py:230-230 (registration)Additional registration in the engagements_tools.py module (possibly redundant).mcp.tool(name="get_engagement", description="Get a specific engagement by ID")(get_engagement)