get_mitigations_by_threat
Retrieve security mitigations for a specific threat to address vulnerabilities and enhance protection measures.
Instructions
Get mitigations for a specific threat
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threat_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:187-192 (handler)The MCP tool handler for 'get_mitigations_by_threat', decorated with @mcp.tool() for registration and execution. It creates an API client context and delegates to the client's get_mitigations_by_threat method, returning the result as string.@mcp.tool() async def get_mitigations_by_threat(threat_id: str) -> str: """Get mitigations for a specific threat""" async with create_client_from_env() as client: result = await client.get_mitigations_by_threat(threat_id) return str(result)
- Supporting method in DeviciAPIClient class that makes the authenticated HTTP GET request to the Devici API endpoint /mitigations/threat/{threat_id} to fetch mitigations associated with the threat.async def get_mitigations_by_threat(self, threat_id: str) -> Dict[str, Any]: """Get all mitigations for specific threat.""" return await self._make_request("GET", f"/mitigations/threat/{threat_id}")