Skip to main content
Glama
jupiterbak

AYX-MCP-Wrapper

by jupiterbak

create_collection

Create a new collection in Alteryx Server to organize and manage workflows, users, schedules, and credentials.

Instructions

Create a new collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The core handler function in AYXMCPTools class that creates a new collection using the Alteryx CollectionsApi.
    def create_collection(self, name: str):
        """Create a new collection. To add a collection to a user, use the update_collection_name_or_owner function."""
        try:
            contract = server_client.CreateCollectionContract(name=name)
            api_response = self.collections_api.collections_create_collection(contract)
            return pprint.pformat(api_response)
        except ApiException as e:
            return f"Error: {e}"
  • MCP tool registration decorator and wrapper function that delegates to the tools.create_collection method.
    @self.app.tool()
    def create_collection(name: str):
        """Create a new collection"""
        return self.tools.create_collection(name)
  • The input schema/model for CreateCollectionContract, defining the 'name' parameter as a string.
    class CreateCollectionContract(object):
        """NOTE: This class is auto generated by the swagger code generator program.
    
        Do not edit the class manually.
        """
    
        """
        Attributes:
          swagger_types (dict): The key is attribute name
                                and the value is attribute type.
          attribute_map (dict): The key is attribute name
                                and the value is json key in definition.
        """
        swagger_types = {"name": "str"}
    
        attribute_map = {"name": "name"}
    
        def __init__(self, name=None, _configuration=None):  # noqa: E501
            """CreateCollectionContract - a model defined in Swagger"""  # noqa: E501
            if _configuration is None:
                _configuration = Configuration()
            self._configuration = _configuration
    
            self._name = None
            self.discriminator = None
    
            self.name = name
    
        @property
        def name(self):
            """Gets the name of this CreateCollectionContract.  # noqa: E501
    
            The name of the new collection.  # noqa: E501
    
            :return: The name of this CreateCollectionContract.  # noqa: E501
            :rtype: str
            """
            return self._name
    
        @name.setter
        def name(self, name):
            """Sets the name of this CreateCollectionContract.
    
            The name of the new collection.  # noqa: E501
    
            :param name: The name of this CreateCollectionContract.  # noqa: E501
            :type: str
            """
            if self._configuration.client_side_validation and name is None:
                raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
    
            self._name = name

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/jupiterbak/AYX-MCP-Wrapper'

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