get_threats
Retrieve threat data from Devici with pagination controls to manage and analyze security risks systematically.
Instructions
Get threats from Devici with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| page | No |
Implementation Reference
- src/devici_mcp_server/server.py:146-152 (handler)MCP tool handler for 'get_threats'. Registers the tool via @mcp.tool() decorator and implements the logic by calling the API client.@mcp.tool() async def get_threats(limit: int = 20, page: int = 0) -> str: """Get threats from Devici with pagination""" async with create_client_from_env() as client: result = await client.get_threats(limit=limit, page=page) return str(result)
- API client method that performs the actual HTTP GET request to fetch threats from the Devici API endpoint "/threats/" with pagination parameters.async def get_threats(self, limit: int = 20, page: int = 0) -> Dict[str, Any]: """Get all threats.""" params = {"limit": limit, "page": page} return await self._make_request("GET", "/threats/", params=params)