Skip to main content
Glama
jupiterbak

AYX-MCP-Wrapper

by jupiterbak

get_workflow_xml

Retrieve the XML representation of a workflow file using its unique identifier to access and analyze workflow structure and configuration.

Instructions

Get the XML representation of a workflow file by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes

Implementation Reference

  • The core handler function for the 'get_workflow_xml' tool. It retrieves a workflow by ID, downloads its package, extracts the ZIP, identifies the primary XML file (.yxmd or .yxwz), and returns the local file path.
    def get_workflow_xml(self, workflow_id: str):
        """Get the XML representation of a workflow file by its ID"""
        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)
            
            with open(
                f"{temp_directory}/{workflow_id}.yxzp",
                "wb" if not os.path.exists(f"{temp_directory}/{workflow_id}.yxz") else "wb+",
            ) as f:
                f.write(api_response)
    
            new_directory = f"{temp_directory}/{workflow_id}"
            if os.path.exists(new_directory):
                shutil.rmtree(new_directory)
            os.makedirs(new_directory)
            
            with zipfile.ZipFile(f"{temp_directory}/{workflow_id}.yxzp", "r") as zip_ref:
                zip_ref.extractall(new_directory)
            
            yxmd_files = [file for file in os.listdir(new_directory) if file.endswith(".yxmd") or file.endswith(".yxwz")]
            if len(yxmd_files) == 0:
                return "Error: No Workflow or Analytics App XML file found after unzipping the downloaded workflow package file"
            
            yxmd_file = yxmd_files[0]
            
            # Return the path to the XML file
            return f"Workflow XML file saved to: {new_directory}/{yxmd_file}"
            
        except ApiException as e:
            return f"Error: {e}"
  • MCP tool registration using @app.tool() decorator. This wrapper function delegates execution to the underlying tools instance's get_workflow_xml method.
    @self.app.tool()
    def get_workflow_xml(workflow_id: str):
        """Get the XML representation of a workflow file by its ID"""
        return self.tools.get_workflow_xml(workflow_id)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves XML, but does not mention whether this is a read-only operation, requires specific permissions, involves rate limits, or what the output format entails (e.g., raw XML string). This leaves significant gaps for a tool with no annotation coverage.

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, clear sentence that efficiently conveys the core function without unnecessary words. It is front-loaded and appropriately sized for the tool's simplicity.

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, no output schema, and low schema coverage, the description is incomplete. It does not address behavioral aspects like safety or output details, and while concise, it fails to provide enough context for reliable tool invocation in a complex environment with many sibling tools.

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?

The input schema has 0% description coverage, but the description adds minimal value by implying the parameter 'workflow_id' is used to fetch the XML. However, it does not explain what a workflow ID is, its format, or where to find it, which is insufficient to fully compensate for the lack of schema documentation.

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 ('Get') and resource ('XML representation of a workflow file'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'get_workflow_by_id' or 'download_workflow_package_file', which might also retrieve workflow-related data, so it lacks sibling distinction for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives, such as 'get_workflow_by_id' (which might return different data) or 'download_workflow_package_file' (which might involve files). There is no mention of prerequisites, context, or exclusions, leaving usage unclear.

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