get_collection
Retrieve a specific collection by its ID from the Devici MCP Server to access threat model data, security components, or mitigations.
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', registered via @mcp.tool() decorator. It creates an API client context and calls the client's get_collection method to fetch and return the collection data 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 authenticated HTTP GET request to the Devici API endpoint /collections/{collection_id} to retrieve the specific collection.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}")