Skip to main content
Glama
jupiterbak

AYX-MCP-Wrapper

by jupiterbak

download_workflow_package_file

Download workflow package files from Alteryx Server by specifying the workflow ID and output directory for local storage.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes
output_directoryYes

Implementation Reference

  • The core handler function in AYXMCPTools class that downloads the workflow package (.yxzp) from Alteryx server using the V3 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}"
  • The MCP tool registration using @self.app.tool() decorator, which wraps the underlying tools.py handler and delegates to it. Note: wrapper adds output_directory param not used in handler.
    @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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as file format, permissions needed, whether it overwrites existing files, error handling, or rate limits. This leaves significant gaps for a tool that performs file operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action. Every word contributes to understanding the tool's purpose without redundancy, making it appropriately sized and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema description coverage, and no output schema, the description is incomplete. It lacks details on file behavior, error cases, or return values, which are crucial for a download operation. The tool's complexity warrants more context than provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'workflow_id' and 'output_directory', aligning with the two parameters, but adds minimal semantics beyond naming them. No details on parameter formats, constraints, or examples are provided, resulting in adequate but incomplete coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Download') and resource ('workflow package file'), specifying it's done 'by its ID' and saved 'to the local directory'. However, it doesn't distinguish from sibling tools like 'get_workflow_xml' or 'get_workflow_by_id', which might retrieve workflow data without downloading files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for downloading files, but it doesn't mention prerequisites, when not to use it, or compare with siblings like 'get_workflow_xml' that might serve similar purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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