Skip to main content
Glama

get_threat_models_by_collection

Retrieve threat models from a specific collection in the Devici MCP Server. Use this tool to access and manage security threat models by collection ID with pagination options.

Instructions

Get threat models for a specific collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYes
limitNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler decorated with @mcp.tool(). It creates an API client and delegates to the client's get_threat_models_by_collection method, returning the result as string.
    @mcp.tool()
    async def get_threat_models_by_collection(collection_id: str, limit: int = 20, page: int = 0) -> str:
        """Get threat models for a specific collection"""
        async with create_client_from_env() as client:
            result = await client.get_threat_models_by_collection(collection_id, limit=limit, page=page)
            return str(result)
  • API client method that performs the actual HTTP GET request to retrieve threat models by collection ID using the _make_request helper.
    async def get_threat_models_by_collection(self, collection_id: str, limit: int = 20, page: int = 0) -> Dict[str, Any]:
        """Get all threat models by collection."""
        params = {"limit": limit, "page": page}
        return await self._make_request("GET", f"/threat-models/collection/{collection_id}", params=params)
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 reveals minimal behavioral traits. It implies a read operation ('Get') but doesn't disclose pagination behavior (limit/page defaults), authentication needs, rate limits, error conditions, or what 'threat models' entails. The description adds little beyond the basic action.

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 wasted words. It's front-loaded with the core action and immediately specifies the key constraint (collection). Every word earns its place.

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 3 parameters with 0% schema coverage, no annotations, but an output schema exists, the description is minimally adequate. It covers the primary purpose but lacks details on parameter usage, behavioral context, or differentiation from siblings. The output schema mitigates the need to describe return values, but other 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 partially does. It mentions 'collection_id' implicitly ('for a specific collection') but doesn't explain what a collection is, format requirements, or the purpose of limit/page parameters. The description adds marginal meaning beyond the bare schema.

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 the resource 'threat models', with the scope 'for a specific collection'. It distinguishes from generic 'get_threat_models' by specifying collection-based filtering, but doesn't explicitly differentiate from 'get_threat_models_report' or 'get_threat_model' (singular).

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_models' (all models) or 'get_threat_model' (single model). It mentions the collection context but doesn't explain prerequisites, exclusions, or comparative use cases with sibling 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/sdelements/devici-mcp'

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