Skip to main content
Glama
jupiterbak

AYX-MCP-Wrapper

by jupiterbak

change_schedule_owner

Transfer schedule ownership to a different user by specifying the schedule ID and new owner ID in Alteryx Server.

Instructions

Change the owner of a schedule by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schedule_idYes
new_owner_idYes

Implementation Reference

  • Core handler function in AYXMCPTools class that implements changing a schedule's owner using the Alteryx V3 API. Fetches the schedule, updates the owner_id in UpdateScheduleContract, and calls schedules_update_schedule.
    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}"
  • MCP tool registration in MCPAlteryxServer class. Decorates the wrapper function with @self.app.tool() and delegates to the tools instance's change_schedule_owner 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jupiterbak/AYX-MCP-Wrapper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server