Skip to main content
Glama

get_threat_models

Retrieve threat models from Devici with pagination controls to manage security analysis data efficiently.

Instructions

Get threat models from Devici with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'get_threat_models'. Creates API client context and delegates to client.get_threat_models, returning stringified result.
    @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)
  • Core API client method implementing the HTTP request to fetch threat models from '/threat-models/' endpoint with pagination parameters.
    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 to create the DeviciAPIClient from environment variables, used in the tool handler.
    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?

With no annotations provided, the description carries full burden but only mentions pagination. It doesn't disclose whether this is a read-only operation, what permissions are needed, rate limits, error conditions, or what the output contains. 'Get' implies safe retrieval, but lacks behavioral details.

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 with zero waste. It's front-loaded with the core purpose and includes the key feature (pagination) without unnecessary details.

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 2 parameters with 0% schema coverage, no annotations, but an output schema exists, the description is minimally adequate. It states the action and pagination but doesn't explain parameters, permissions, or alternatives. The output schema reduces need for return value details, but gaps remain.

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 description must compensate but only mentions 'pagination' generically. It doesn't explain what 'limit' and 'page' parameters do, their ranges, or how pagination works. Baseline is 3 since schema covers parameters structurally, but description adds minimal value.

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 'threat models from Devici', making the purpose understandable. It distinguishes from siblings like 'get_threat_model' (singular) by implying it retrieves multiple models, but doesn't explicitly differentiate from 'get_threat_models_by_collection' or 'get_threat_models_report'.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_threat_models_by_collection' or 'get_threat_models_report'. The mention of pagination implies it's for listing multiple models, but there's no explicit comparison or exclusion criteria.

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

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