get_threat_models
Retrieve threat models from Devici MCP Server with paginated results for efficient management and analysis. Specify limit and page parameters to control output.
Instructions
Get threat models from Devici with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| page | No |
Implementation Reference
- src/devici_mcp_server/server.py:81-86 (handler)The MCP tool handler for 'get_threat_models'. It creates an API client context and calls the client's get_threat_models method, returning the result as a string.@mcp.tool() async def get_threat_models(limit: int = 20, page: int = 0) -> str: """Get threat models from Devici with pagination""" async with create_client_from_env() as client: result = await client.get_threat_models(limit=limit, page=page) return str(result)
- The helper function in the API client that performs the actual HTTP request to fetch threat models from the Devici API endpoint '/threat-models/' with pagination parameters.async def get_threat_models(self, limit: int = 20, page: int = 0) -> Dict[str, Any]: """Get all threat models.""" params = {"limit": limit, "page": page} return await self._make_request("GET", "/threat-models/", params=params)