get_mitigations
Retrieve security mitigations from Devici with paginated results to manage and implement threat protection measures.
Instructions
Get mitigations from Devici with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| page | No |
Implementation Reference
- src/devici_mcp_server/server.py:171-176 (handler)MCP tool handler for 'get_mitigations'. The @mcp.tool() decorator registers the tool and the function executes the logic by calling the Devici API client to fetch mitigations with pagination.@mcp.tool() async def get_mitigations(limit: int = 20, page: int = 0) -> str: """Get mitigations from Devici with pagination""" async with create_client_from_env() as client: result = await client.get_mitigations(limit=limit, page=page) return str(result)
- Supporting API client method that performs the HTTP GET request to retrieve mitigations from the Devici API (/mitigations/), used by the MCP tool handler.async def get_mitigations(self, limit: int = 20, page: int = 0) -> Dict[str, Any]: """Get all mitigations.""" params = {"limit": limit, "page": page} return await self._make_request("GET", "/mitigations/", params=params)