add_schedule_to_collection
Link a schedule to a collection by specifying the collection ID and schedule ID. Enables organized automation of workflows within the AYX-MCP-Wrapper environment.
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)Core handler function that implements the logic to add a schedule to a collection using the Alteryx Collections API. Validates existence of collection and schedule, creates AddScheduleContract, calls the API, and formats the response.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 tool registration using @self.app.tool() decorator. This wrapper function delegates the call to the AYXMCPTools instance's add_schedule_to_collection method.@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)