add_schedule_to_collection
Add a schedule to a collection in Alteryx by specifying the collection ID and schedule ID to automate workflow execution.
Instructions
Add a schedule to a collection by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| schedule_id | Yes |
Implementation Reference
- src/tools.py:112-125 (handler)The core handler function that implements the logic to add a schedule to a collection by verifying existence and calling the Alteryx collections API.def add_schedule_to_collection(self, collection_id: str, schedule_id: str): """Add a schedule to a collection by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" schedule = self.schedules_api.schedules_get_schedule(schedule_id) if not schedule: return "Error: Schedule not found" contract = server_client.AddScheduleContract(schedule_id=schedule_id) api_response = self.collections_api.collections_add_schedule_to_collection(collection_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:156-159 (registration)MCP server registration of the tool, which wraps and delegates to the handler in AYXMCPTools.@self.app.tool() def add_schedule_to_collection(collection_id: str, schedule_id: str): """Add a schedule to a collection by its ID""" return self.tools.add_schedule_to_collection(collection_id, schedule_id)