update_schedule_name_or_comment
Modify schedule names or comments by ID to maintain accurate documentation and organization of automated tasks in Alteryx workflows.
Instructions
Update a schedule name or comment by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule_id | Yes | ||
| name | Yes | ||
| comment | Yes |
Implementation Reference
- src/mcp_server.py:324-328 (registration)Registers the MCP tool by decorating the handler function with @self.app.tool(), which delegates to the implementation in self.tools.@self.app.tool() def update_schedule_name_or_comment(schedule_id: str, name: str, comment: str): """Update a schedule name or comment by its ID""" return self.tools.update_schedule_name_or_comment(schedule_id, name, comment)
- src/tools.py:655-678 (handler)The core handler function that implements the tool logic: fetches the current schedule, constructs an UpdateScheduleContract with updated name/comment, calls the Alteryx API to update, and returns formatted response or error.def update_schedule_name_or_comment(self, schedule_id: str, name: str, comment: str): """Update the name or comment of a schedule by its ID""" try: schedule = self.schedules_api.schedules_get_schedule(schedule_id) if not schedule: return "Error: Schedule not found" contract = server_client.UpdateScheduleContract( workflow_id=schedule.workflow_id, owner_id=schedule.owner_id, iteration=schedule.iteration, name=name if name else schedule.name, comment=comment if comment else schedule.comment, priority=schedule.priority, worker_tag=schedule.worker_tag, enabled=schedule.enabled, credential_id=schedule.credential_id, time_zone=schedule.time_zone, questions=schedule.questions, ) api_response = self.schedules_api.schedules_update_schedule(schedule_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"