Skip to main content
Glama

get_threats

Retrieve paginated threat data from Devici's threat modeling platform to analyze security risks.

Instructions

Get threats from Devici with pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_threats' MCP tool. It is registered via the @mcp.tool() decorator and executes the tool logic by calling the API client.
    @mcp.tool()
    async def get_threats(limit: int = 20, page: int = 0) -> str:
        """Get threats from Devici with pagination"""
        async with create_client_from_env() as client:
            result = await client.get_threats(limit=limit, page=page)
            return str(result)
  • Supporting API client method that performs the actual HTTP request to retrieve threats from the Devici API, called by the MCP tool handler.
    async def get_threats(self, limit: int = 20, page: int = 0) -> Dict[str, Any]:
        """Get all threats."""
        params = {"limit": limit, "page": page}
        return await self._make_request("GET", "/threats/", params=params)
  • The @mcp.tool() decorator registers this function as the 'get_threats' tool in the FastMCP server.
    @mcp.tool()
    async def get_threats(limit: int = 20, page: int = 0) -> str:
        """Get threats from Devici with pagination"""
        async with create_client_from_env() as client:
            result = await client.get_threats(limit=limit, page=page)
            return str(result)
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 a useful behavioral trait, but lacks details on permissions, rate limits, response format, or error handling. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond basic functionality.

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: 'Get threats from Devici with pagination'. It's front-loaded with the core action and resource, and the additional detail (pagination) is relevant and concise. There's no wasted verbiage, making it easy to parse quickly.

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 read operation with pagination), no annotations, and an output schema (which handles return values), the description is minimally adequate. It covers the basic purpose and hints at behavior but lacks details on usage context, parameter semantics, and full behavioral traits. With output schema present, it doesn't need to explain returns, but overall completeness is limited.

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 input schema has 2 parameters (limit, page) with 0% description coverage, so the schema provides no semantic context. The description adds value by implying pagination, which relates to these parameters, but doesn't explain their roles (e.g., limit controls results per page, page indicates offset). It partially compensates for the schema gap but doesn't fully clarify parameter meanings.

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

Purpose3/5

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

The description 'Get threats from Devici with pagination' clearly states the action (get) and resource (threats), and mentions the system (Devici) and a key feature (pagination). However, it doesn't differentiate from sibling tools like 'get_threat' (singular) or 'get_threats_by_component', leaving the scope ambiguous. It's specific enough to understand the basic function but lacks sibling distinction.

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 siblings like 'get_threat' (for a single threat) and 'get_threats_by_component' (for filtered threats), there's no indication of context, prerequisites, or exclusions. The mention of 'pagination' hints at usage for large datasets but doesn't explicitly guide 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