change_schedule_owner
Transfer schedule ownership by specifying the schedule ID and new owner ID within the AYX-MCP-Wrapper server, ensuring accurate management of scheduling responsibilities.
Instructions
Change the owner of a schedule by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_owner_id | Yes | ||
| schedule_id | Yes |
Implementation Reference
- src/tools.py:680-703 (handler)Core implementation of the change_schedule_owner tool. Fetches the current schedule, constructs an UpdateScheduleContract with the new owner_id, and updates the schedule via the Alteryx Server API.def change_schedule_owner(self, schedule_id: str, new_owner_id: str): """Change the owner 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=new_owner_id if new_owner_id else schedule.owner_id, iteration=schedule.iteration, name=schedule.name, comment=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:329-333 (registration)MCP tool registration decorator (@self.app.tool()) that defines the tool handler in the MCP server, delegating execution to the Tools class method.@self.app.tool() def change_schedule_owner(schedule_id: str, new_owner_id: str): """Change the owner of a schedule by its ID""" return self.tools.change_schedule_owner(schedule_id, new_owner_id)