update_workflow_name_or_comment
Modify a workflow's name or comment by specifying its ID. Use this tool to update workflow metadata on Alteryx Servers via the AYX-MCP-Wrapper interface.
Instructions
Update a workflow name or comment by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | Yes | ||
| name | Yes | ||
| workflow_id | Yes |
Implementation Reference
- src/tools.py:158-187 (handler)Core handler function implementing the tool logic: fetches workflow details, constructs UpdateWorkflowContract with provided name/comment or existing values, and updates via API.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-181 (registration)MCP tool registration using @self.app.tool() decorator, which delegates to the tools 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)