Skip to main content
Glama

export_workflow

Export workflows as portable JSON for cross-environment transfer, stripping workspace-specific identifiers to enable movement between environments like sandbox and production.

Instructions

Export a workflow as portable JSON for cross-environment transfer. Returns a self-contained WorkflowExport object with all steps, context, metadata, and pages. Workspace-specific identifiers (workspaceId, agentIds) are stripped so the export can be imported into any workspace.

Use this together with import_workflow to move workflows between environments (e.g. sandbox → prod).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID to export

Implementation Reference

  • The tool registration and handler implementation for 'export_workflow'. It calls the client's exportWorkflow method and formats the result as JSON.
        server.tool(
            'export_workflow',
            `Export a workflow as portable JSON for cross-environment transfer.
    Returns a self-contained WorkflowExport object with all steps, context, metadata, and pages.
    Workspace-specific identifiers (workspaceId, agentIds) are stripped so the export can be imported into any workspace.
    
    Use this together with import_workflow to move workflows between environments (e.g. sandbox → prod).`,
            {
                workflowId: z.string().describe('The workflow ID to export'),
            },
            async ({ workflowId }, extra) => {
                const client = clientFactory(extra);
                const result = await client.exportWorkflow(workflowId);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
  • The underlying client method that performs the API request to export the workflow.
    async exportWorkflow(id: string) {
        return this.request(`/workflows/${id}/export`);
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it returns a 'self-contained WorkflowExport object' with specific contents (steps, context, metadata, pages), strips workspace-specific identifiers for portability, and implies a read-only operation (exporting rather than modifying). However, it doesn't mention error conditions, rate limits, or authentication requirements.

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 efficiently structured in three sentences: the first states the core purpose and output, the second explains the portability feature, and the third provides usage context. Every sentence adds essential information with zero waste, making it easy to parse.

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

Completeness4/5

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

For a single-parameter tool with no output schema and no annotations, the description does well by explaining the output format ('WorkflowExport object'), contents, and portability behavior. It could be more complete by detailing error cases or response structure, but it covers the essential context given the tool's complexity.

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 100% description coverage, with the single parameter 'workflowId' clearly documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

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

Purpose5/5

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

The description clearly states the specific action ('Export a workflow as portable JSON') and resource ('workflow'), distinguishing it from siblings like 'import_workflow' (for importing) and 'get_workflow' (for viewing). It explicitly mentions the output format and purpose for cross-environment transfer.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Use this together with import_workflow to move workflows between environments (e.g. sandbox → prod).' It names the alternative tool ('import_workflow') and gives a concrete use case, clearly differentiating it from other workflow-related tools.

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/Agentled/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server