Skip to main content
Glama

import_workflow

Import workflow configurations from JSON exports to recreate them in new environments with fresh IDs and recorded provenance. Use to transfer workflows between different MCP server instances.

Instructions

Import a workflow from an export JSON into this workspace. Accepts the full WorkflowExport object (from export_workflow) and creates a new workflow with fresh IDs. Associated pages are recreated. Import provenance is recorded in the workflow metadata.

Use this together with export_workflow to move workflows between environments. Tip: register separate MCP servers for sandbox and prod, export from one, import into the other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exportJsonYesThe WorkflowExport object (output from export_workflow)
localeNoLocale for the imported workflow (default: en)

Implementation Reference

  • The handler function for import_workflow, which calls the client's importWorkflow method.
    async ({ exportJson, locale }, extra) => {
        const client = clientFactory(extra);
        const result = await client.importWorkflow(exportJson, locale);
        return {
            content: [{
                type: 'text' as const,
                text: JSON.stringify(result, null, 2),
            }],
        };
    }
  • Registration of the import_workflow tool with schema definition.
        server.tool(
            'import_workflow',
            `Import a workflow from an export JSON into this workspace.
    Accepts the full WorkflowExport object (from export_workflow) and creates a new workflow with fresh IDs.
    Associated pages are recreated. Import provenance is recorded in the workflow metadata.
    
    Use this together with export_workflow to move workflows between environments.
    Tip: register separate MCP servers for sandbox and prod, export from one, import into the other.`,
            {
                exportJson: z.record(z.string(), z.any()).describe('The WorkflowExport object (output from export_workflow)'),
                locale: z.string().optional().describe('Locale for the imported workflow (default: en)'),
            },
            async ({ exportJson, locale }, extra) => {
                const client = clientFactory(extra);
                const result = await client.importWorkflow(exportJson, locale);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • The actual API client method that performs the network request for importing a workflow.
    async importWorkflow(exportData: Record<string, any>, locale?: string) {
        return this.request('/workflows/import', {
            method: 'POST',
            body: JSON.stringify({ export: exportData, locale }),
        });
    }
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: creates new workflows with fresh IDs, recreates associated pages, records import provenance in metadata, and works with WorkflowExport objects. However, it doesn't mention potential side effects like overwriting existing workflows 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 with three focused paragraphs: purpose statement, behavioral details, and usage guidance. Every sentence adds value with zero wasted words. The information is front-loaded with the core purpose stated immediately.

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 mutation tool with no annotations and no output schema, the description provides good coverage of what the tool does, how to use it, and its relationship to export_workflow. However, it doesn't describe the return value or error conditions, which would be helpful given the absence of an output schema.

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 100%, so the schema already documents both parameters thoroughly. The description adds some context by mentioning 'exportJson' should be 'the full WorkflowExport object (from export_workflow)', but doesn't provide additional semantic meaning beyond what's in the schema descriptions. This meets the baseline for high schema coverage.

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 ('Import a workflow from an export JSON'), identifies the resource ('workflow'), and distinguishes it from siblings by specifying it works with 'export_workflow' output and creates new workflows with fresh IDs. It explicitly differentiates from 'import_n8n_workflow' by focusing on native workflow exports.

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 export_workflow to move workflows between environments') and offers a practical tip about registering separate MCP servers for different environments. It clearly positions this as a companion to export_workflow for migration 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/Agentled/mcp-server'

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