Skip to main content
Glama

get_threat_models

Retrieve threat models from Devici with pagination controls to manage and analyze security risks systematically.

Instructions

Get threat models from Devici with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler for 'get_threat_models'. This function is decorated with @mcp.tool(), registering it as an MCP tool. It creates an API client and delegates to the client's get_threat_models method, returning the result as a string.
    @mcp.tool()
    async def get_threat_models(limit: int = 20, page: int = 0) -> str:
        """Get threat models from Devici with pagination"""
        async with create_client_from_env() as client:
            result = await client.get_threat_models(limit=limit, page=page)
            return str(result)
  • The API client helper method that implements the core logic for fetching threat models from the Devici API via an authenticated GET request to '/threat-models/' endpoint.
    async def get_threat_models(self, limit: int = 20, page: int = 0) -> Dict[str, Any]:
        """Get all threat models."""
        params = {"limit": limit, "page": page}
        return await self._make_request("GET", "/threat-models/", params=params)
  • Factory function used by the handler to create and configure the DeviciAPIClient 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 the full burden of behavioral disclosure. It mentions pagination, which is useful context, but fails to describe other key behaviors such as authentication requirements, rate limits, error handling, or what the output looks like (though an output schema exists). For a list tool with zero annotation coverage, this leaves significant gaps in understanding how the tool operates.

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 a single, efficient sentence that front-loads the core purpose ('Get threat models from Devici') and adds essential context ('with pagination'). There is no wasted verbiage, making it appropriately concise and well-structured for quick understanding.

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 complexity (a list operation with pagination), no annotations, and an output schema (which reduces the need to describe return values), the description is minimally adequate. It covers the basic action and hints at pagination, but lacks details on usage context, behavioral traits, and parameter meanings, leaving room for improvement in completeness.

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?

Schema description coverage is 0%, so the schema provides no descriptions for the 'limit' and 'page' parameters. The description adds value by mentioning 'pagination', which implies the use of these parameters, but it doesn't explain their semantics (e.g., what 'limit' and 'page' mean in this context, default values, or constraints). This partial compensation justifies a baseline score of 3, as it hints at parameter usage without full details.

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 action ('Get') and resource ('threat models from Devici'), making the purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'get_threat_model' (singular) or 'get_threat_models_by_collection', leaving some ambiguity about when to use this specific list endpoint versus alternatives.

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 like 'get_threat_model' (singular) or 'get_threat_models_by_collection'. It mentions pagination, which implies usage for listing multiple items, but lacks explicit context or prerequisites for selection among similar tools.

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