Skip to main content
Glama

get_threat_models_by_collection

Retrieve threat models associated with a specific collection, filtering results by limit and page parameters for efficient threat analysis and management.

Instructions

Get threat models for a specific collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYes
limitNo
pageNo

Implementation Reference

  • MCP tool handler function that executes the tool logic: creates an API client context, calls the client method to fetch threat models by collection, and returns the result as string. The @mcp.tool() decorator also registers it with the MCP server.
    @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)
  • Supporting API client method that makes the HTTP GET request to the Devici API endpoint for threat models in a specific collection.
    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)

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