get_threats_by_component
Retrieve security threats associated with a specific component to identify vulnerabilities and support threat modeling analysis.
Instructions
Get threats for a specific component
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"component_id": "<component_id>"
},
"name": "get_threats_by_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:162-167 (handler)MCP tool handler decorated with @mcp.tool() that executes the tool logic by calling the API client to fetch threats for a given component ID and returns 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) - Helper method in the API client class that performs the actual HTTP GET request to the Devici API endpoint for threats by 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}")