update_workflow_name_or_comment
Modify workflow names and comments in Alteryx Server to maintain organized documentation and clear identification of processes.
Instructions
Update a workflow name or comment by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | ||
| name | Yes | ||
| comment | Yes |
Implementation Reference
- src/tools.py:158-186 (handler)Core handler function in AYXMCPTools class that fetches the workflow, constructs UpdateWorkflowContract with optional new name/comment, and updates via workflows_api.workflows_update_workflow.def update_workflow_name_or_comment(self, workflow_id: str, name: str, comment: str): """Update a workflow name or comment by its ID""" try: workflow = self.workflows_api.workflows_get_workflow(workflow_id) if not workflow: return "Error: Workflow not found" workflow_details = workflow latest_version_id = server_client.WorkflowVersionView( workflow_details.versions[len(workflow_details.versions) - 1] ).version_id contract = server_client.UpdateWorkflowContract( name=name if name else workflow_details.name, version_id=latest_version_id, make_published=workflow_details.is_public, owner_id=workflow_details.owner_id, worker_tag=workflow_details.worker_tag, district_tags=workflow_details.district_tags, comment=comment if comment else workflow_details.comments, is_public=workflow_details.is_public, is_ready_for_migration=workflow_details.is_ready_for_migration, others_may_download=workflow_details.others_may_download, others_can_execute=workflow_details.others_can_execute, execution_mode=workflow_details.execution_mode, has_private_data_exemption=workflow_details.has_private_data_exemption, ) api_response = self.workflows_api.workflows_update_workflow(workflow_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:177-180 (registration)MCP tool registration using @self.app.tool() decorator, which delegates to the AYXMCPTools instance method.@self.app.tool() def update_workflow_name_or_comment(workflow_id: str, name: str, comment: str): """Update a workflow name or comment by its ID""" return self.tools.update_workflow_name_or_comment(workflow_id, name, comment)