update_schedule_name_or_comment
Modify or update the name and comment of a schedule using its unique ID within the AYX-MCP-Wrapper server, ensuring accurate and organized workflow management.
Instructions
Update a schedule name or comment by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | Yes | ||
| name | Yes | ||
| schedule_id | Yes |
Implementation Reference
- src/tools.py:655-678 (handler)Main handler function that implements the logic to update schedule name or comment by fetching current schedule, creating update contract, and calling the API.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}"
- src/mcp_server.py:324-328 (registration)MCP tool registration and thin handler that delegates to the tools instance.@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/mcp_server.py:325-327 (handler)MCP entry point handler function.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)