create_threat_model
Generate threat models to identify security risks in systems by analyzing components and potential vulnerabilities for risk assessment.
Instructions
Create a new threat model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| collection_id | Yes | ||
| description | No | ||
| other_properties | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:105-117 (handler)MCP tool handler for 'create_threat_model'. Decorated with @mcp.tool() for registration. Builds threat model data and calls the API client to create it via POST request.@mcp.tool() async def create_threat_model(name: str, collection_id: str, description: str = None, **other_properties) -> str: """Create a new threat model""" async with create_client_from_env() as client: threat_model_data = { "name": name, "collection_id": collection_id } if description: threat_model_data["description"] = description threat_model_data.update(other_properties) result = await client.create_threat_model(threat_model_data) return str(result)
- API client helper method that sends the HTTP POST request to /threat-models endpoint to create the threat model.async def create_threat_model(self, threat_model_data: Dict[str, Any]) -> Dict[str, Any]: """Create new threat model.""" return await self._make_request("POST", "/threat-models", json_data=threat_model_data)
- Function signature defines the input schema: required name and collection_id (strings), optional description, and other_properties.async def create_threat_model(name: str, collection_id: str, description: str = None, **other_properties) -> str: