get_collection
Retrieve a specific collection by its unique ID from the Devici API, enabling efficient management of 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-65 (handler)The MCP tool handler for 'get_collection', decorated with @mcp.tool(). It fetches the collection using the Devici API client and returns the JSON result as a string.@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)
- API client helper method that performs 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}")