Skip to main content
Glama

create_collection

Create a new collection to organize threat models, security components, and mitigations within the Devici security platform.

Instructions

Create a new collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo
other_propertiesYes

Implementation Reference

  • The main MCP tool handler for 'create_collection'. It takes name, optional description and other properties, constructs the data dict, calls the API client, and returns the result as string.
    @mcp.tool()
    async def create_collection(name: str, description: str = None, **other_properties) -> str:
        """Create a new collection"""
        async with create_client_from_env() as client:
            collection_data = {"name": name}
            if description:
                collection_data["description"] = description
            collection_data.update(other_properties)
            result = await client.create_collection(collection_data)
            return str(result)
  • Helper method in the DeviciAPIClient class that makes the HTTP POST request to the /collections endpoint to create a new collection.
    async def create_collection(self, collection_data: Dict[str, Any]) -> Dict[str, Any]:
        """Create new collection."""
        return await self._make_request("POST", "/collections", json_data=collection_data)

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