Skip to main content
Glama

add_workflow_to_collection

Associate a workflow with a specific collection using its ID. Ideal for organizing and managing workflows within Alteryx Server via the AYX-MCP-Wrapper.

Instructions

Add a workflow to a collection by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYes
workflow_idYes

Implementation Reference

  • Core implementation of the add_workflow_to_collection tool. Validates the existence of the collection and workflow, creates an AddWorkflowContract, calls the collections API to add the workflow, and returns the formatted API response or error.
    def add_workflow_to_collection(self, collection_id: str, workflow_id: str): """Add a workflow to a collection by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" workflow = self.workflows_api.workflows_get_workflow(workflow_id) if not workflow: return "Error: Workflow not found" contract = server_client.AddWorkflowContract(workflow_id=workflow_id) api_response = self.collections_api.collections_add_workflow_to_collection(collection_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
  • MCP tool registration using @self.app.tool() decorator. This wrapper function delegates the execution to the AlteryxTools instance's add_workflow_to_collection method.
    @self.app.tool() def add_workflow_to_collection(collection_id: str, workflow_id: str): """Add a workflow to a collection by its ID""" return self.tools.add_workflow_to_collection(collection_id, workflow_id)
  • MCP handler function for the tool, decorated and registered, which calls the core implementation in tools.py.
    @self.app.tool() def add_workflow_to_collection(collection_id: str, workflow_id: str): """Add a workflow to a collection by its ID""" return self.tools.add_workflow_to_collection(collection_id, workflow_id)

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