Skip to main content
Glama

get_threat

Retrieve detailed information about a specific security threat using its unique identifier. This tool helps security teams access threat data for analysis and response.

Instructions

Get a specific threat by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threat_idYes

Implementation Reference

  • MCP tool handler for 'get_threat': decorated with @mcp.tool(), accepts threat_id (str), fetches the threat via API client, converts result to string and returns it.
    @mcp.tool() async def get_threat(threat_id: str) -> str: """Get a specific threat by ID""" async with create_client_from_env() as client: result = await client.get_threat(threat_id) return str(result)
  • Supporting API client method that executes the HTTP GET request to '/threats/{threat_id}' to retrieve threat details.
    async def get_threat(self, threat_id: str) -> Dict[str, Any]: """Get specific threat by ID.""" return await self._make_request("GET", f"/threats/{threat_id}")
  • Core helper method in API client for making authenticated HTTP requests to the Devici API, used by get_threat.
    async def _make_request( self, method: str, endpoint: str, params: Optional[Dict[str, Any]] = None, json_data: Optional[Dict[str, Any]] = None ) -> Dict[str, Any]: """Make authenticated request to Devici API.""" if not self.access_token: await self.authenticate() try: response = await self.client.request( method=method, url=endpoint, params=params, json=json_data ) response.raise_for_status() return response.json() except httpx.HTTPError as e: logger.error(f"API request failed: {method} {endpoint} - {e}") raise

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