Skip to main content
Glama

get_threat_models_by_collection

Retrieve threat models from a specific collection to analyze security risks and manage threat modeling resources.

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 function decorated with @mcp.tool(). It creates an API client instance, calls the client's get_threat_models_by_collection method, and returns the result as a string. This is the core execution logic for the tool.
    @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 constructs the HTTP GET request to the Devici API endpoint /threat-models/collection/{collection_id} with pagination parameters and handles the response.
    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)
  • The @mcp.tool() decorator registers the get_threat_models_by_collection function as an MCP tool on the FastMCP server instance.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action without mentioning permissions, rate limits, pagination behavior (implied by 'limit' and 'page' parameters but not explained), or response format. This is inadequate for a tool with parameters and potential complexity.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, 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 3 parameters, 0% schema coverage, no annotations, but an output schema exists, the description is incomplete. It covers the basic purpose but lacks details on parameter usage, behavioral traits, and differentiation from siblings. The output schema mitigates some gaps by documenting return values, but overall, it's minimally viable with clear deficiencies.

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

Parameters2/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 fails to do so. It mentions 'for a specific collection', which hints at 'collection_id', but doesn't explain 'limit' or 'page' parameters or their effects (e.g., pagination). The description adds minimal meaning beyond the schema, leaving key parameters undocumented.

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 threat models for a specific collection' clearly states the action (get) and resource (threat models), but it's vague about scope and doesn't distinguish from siblings like 'get_threat_models' or 'get_threat_models_report'. It specifies 'for a specific collection', which adds some context but remains basic.

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 such as 'get_threat_models' (which might fetch all threat models) or 'get_threat_models_report' (which might generate reports). The description implies usage for a specific collection but lacks explicit when/when-not instructions or prerequisites.

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