Skip to main content
Glama

get_threat_model

Retrieve a specific threat model by its ID to analyze security risks and vulnerabilities within the Devici API ecosystem.

Instructions

Get a specific threat model by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threat_model_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'get_threat_model'. This function is decorated with @mcp.tool(), executes the tool logic by calling the API client to fetch a specific threat model by ID and returns the result as a string.
    @mcp.tool()
    async def get_threat_model(threat_model_id: str) -> str:
        """Get a specific threat model by ID"""
        async with create_client_from_env() as client:
            result = await client.get_threat_model(threat_model_id)
            return str(result)
  • Supporting API client method called by the tool handler to make the HTTP GET request to the Devici API endpoint /threat-models/{threat_model_id}.
    async def get_threat_model(self, threat_model_id: str) -> Dict[str, Any]:
        """Get specific threat model by ID."""
        return await self._make_request("GET", f"/threat-models/{threat_model_id}")
  • Factory function used by the tool handler to create an authenticated DeviciAPIClient instance from environment variables.
    def create_client_from_env() -> DeviciAPIClient:
        """Create API client from environment variables."""
        config = DeviciConfig(
            api_base_url=os.getenv("DEVICI_API_BASE_URL", "https://api.devici.com/api/v1"),
            client_id=os.getenv("DEVICI_CLIENT_ID", ""),
            client_secret=os.getenv("DEVICI_CLIENT_SECRET", ""),
            debug=os.getenv("DEBUG", "false").lower() == "true"
        )
        
        if not config.client_id or not config.client_secret:
            raise ValueError("DEVICI_CLIENT_ID and DEVICI_CLIENT_SECRET must be set")
            
        return DeviciAPIClient(config) 
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states it's a read operation ('Get'), implying it's non-destructive, but doesn't mention authentication needs, rate limits, error handling, or what happens if the ID doesn't exist. For a tool with no annotation coverage, this leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete parameter guidance, it lacks context on usage scenarios and behavioral traits, making it incomplete for optimal agent decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions the parameter ('by ID'), which adds meaning beyond the schema's 0% description coverage. However, it doesn't specify the ID format (e.g., UUID, numeric) or where to find it, leaving gaps. With one parameter and low schema coverage, the description provides some but incomplete compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('a specific threat model by ID'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_threat_models' (plural) or 'get_threat_models_by_collection', leaving some ambiguity about when to use this specific retrieval method versus others.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_threat_models' (likely for listing) and 'get_threat_models_by_collection', there's no indication whether this is for single-item retrieval by unique ID or if it has specific prerequisites. This lack of context could lead to misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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