get_threats_by_component
Retrieve security threats associated with a specific component to identify vulnerabilities and assess risk in threat modeling workflows.
Instructions
Get threats for a specific component
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:162-167 (handler)MCP tool handler function for get_threats_by_component. It creates an API client context and delegates to the client's get_threats_by_component method, returning the result as string.@mcp.tool() async def get_threats_by_component(component_id: str) -> str: """Get threats for a specific component""" async with create_client_from_env() as client: result = await client.get_threats_by_component(component_id) return str(result)
- API client helper method that makes a GET request to /threats/component/{component_id} to fetch threats for the given component.async def get_threats_by_component(self, component_id: str) -> Dict[str, Any]: """Get all threats for specific component.""" return await self._make_request("GET", f"/threats/component/{component_id}")