Skip to main content
Glama

get_collection

Retrieve a specific collection by its unique ID to access organized threat model data within the Devici security platform.

Instructions

Get a specific collection by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYes

Implementation Reference

  • The main MCP tool handler for 'get_collection'. It creates an API client context, calls the client's get_collection method with the provided collection_id, and returns the 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)
  • Helper method in the API client that performs the actual HTTP GET request to retrieve the specific collection by ID from the Devici API.
    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}")
  • The @mcp.tool() decorator registers the get_collection function as an MCP tool.
    @mcp.tool()
  • Factory function to create the DeviciAPIClient instance from environment variables, used in the handler.
    def create_client_from_env() -> DeviciAPIClient:

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/sdelements/devici-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server