Skip to main content
Glama

get_threat

Retrieve detailed information about a specific threat by its unique ID, enabling efficient threat analysis and management within the Devici API ecosystem.

Instructions

Get a specific threat by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threat_idYes

Implementation Reference

  • MCP tool handler for 'get_threat'. Fetches a specific threat by ID from the Devici API via the client and returns it as a string.
    @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)
  • API client helper method that performs the HTTP GET request to retrieve the specific threat from the Devici API.
    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 the API client that handles authenticated HTTP requests to the Devici API endpoints.
    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
  • Creation of the FastMCP server instance where all @mcp.tool() decorators register the tools, including get_threat.
    mcp = FastMCP("devici-mcp-server")

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/geoffwhittington/devici-mcp'

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