get_threats
Retrieve paginated threat data from Devici to analyze security risks and monitor potential vulnerabilities in your system.
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:147-151 (handler)The MCP tool handler function for 'get_threats' that uses the API client to fetch paginated threats from Devici and returns the result as a string.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)
- src/devici_mcp_server/server.py:146-146 (registration)FastMCP decorator that registers the get_threats function as an MCP tool.@mcp.tool()
- API client method implementing the HTTP request to retrieve threats from the Devici API /threats/ endpoint.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)