get_collection
Retrieve a specific collection by its ID from the Devici threat modeling platform to access and manage threat modeling resources.
Instructions
Get a specific collection by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:60-66 (handler)MCP tool handler for 'get_collection'. This is the main execution function decorated with @mcp.tool(), which also registers it. It creates an API client and calls the helper to fetch the collection data.@mcp.tool() async def get_collection(collection_id: str) -> str: """Get a specific collection by ID""" async with create_client_from_env() as client: result = await client.get_collection(collection_id) return str(result)
- Supporting API client method that makes the HTTP GET request to the Devici API endpoint for retrieving a specific collection by ID.async def get_collection(self, collection_id: str) -> Dict[str, Any]: """Get specific collection by ID.""" return await self._make_request("GET", f"/collections/{collection_id}")