Skip to main content
Glama

download_workflow_package_file

Download a workflow package file by its ID to a specified local directory using the AYX-MCP-Wrapper server.

Instructions

Download a workflow package file by its ID and save it to the local directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_directoryYes
workflow_idYes

Implementation Reference

  • The core handler function that downloads the workflow package using the Alteryx API and saves it to the configured temp directory.
    def download_workflow_package_file(self, workflow_id: str): """Download a workflow package file by its ID and save it to the local directory""" try: api_response = self.workflows_api.workflows_get_workflow(workflow_id) if api_response is None: return "Error: Workflow not found" # Download the workflow file api_response = self.workflows_api.workflows_download_workflow(workflow_id) if api_response is None: return "Error: Failed to download workflow" # Create the output directory if it doesn't exist temp_directory = self.configuration.temp_directory # normalize the temp directory temp_directory = os.path.normpath(temp_directory) if not os.path.exists(temp_directory): os.makedirs(temp_directory) # Save the workflow file to the output directory with open( f"{temp_directory}/{workflow_id}.yxzp", "wb" if not os.path.exists(f"{temp_directory}/{workflow_id}.yxzp") else "wb+", ) as f: f.write(api_response) return ( f"Workflow {workflow_id} downloaded successfully. File saved to '{temp_directory}/{workflow_id}.yxzp'" ) except ApiException as e: return f"Error: {e.body}"
  • MCP tool registration using @app.tool(), defining the tool interface with workflow_id and output_directory parameters, delegating to the tools instance method.
    @self.app.tool() def download_workflow_package_file(workflow_id: str, output_directory: str): """Download a workflow package file by its ID and save it to the local directory""" return self.tools.download_workflow_package_file(workflow_id, output_directory)

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