Skip to main content
Glama

get_threats_by_component

Identify security threats associated with a specific component in threat models to assess vulnerabilities and prioritize mitigation actions.

Instructions

Get threats for a specific component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
component_idYes

Implementation Reference

  • The main MCP tool handler for 'get_threats_by_component'. It uses @mcp.tool() decorator for registration, creates an API client from environment variables, calls the client's method to fetch threats by component ID, and returns the JSON stringified result.
    @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)
  • Supporting helper method in the DeviciAPIClient class that makes the actual HTTP GET request to the '/threats/component/{component_id}' API endpoint to retrieve threats associated with the 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}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sdelements/devici-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server