Skip to main content
Glama

import_n8n_workflow

Convert n8n workflow JSON into Agentled workflows by importing and creating draft versions for review before activation.

Instructions

Create a new Agentled workflow from an n8n JSON import.

Behavior:

  • runs deterministic import preview

  • creates workflow in preflight draft mode

  • stores imported contract for review/approval

  • does NOT auto-apply scaffold

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n8nJsonNon8n workflow JSON object or string export
workflowNoOptional metadata overrides for the created workflow
optionsNoOptional import options
localeNoLocale for workflow creation (default en)

Implementation Reference

  • The registration and MCP handler for the 'import_n8n_workflow' tool. It delegates to the client's importN8nWorkflow method.
        server.tool(
            'import_n8n_workflow',
            `Create a new Agentled workflow from an n8n JSON import.
    
    Behavior:
    - runs deterministic import preview
    - creates workflow in preflight draft mode
    - stores imported contract for review/approval
    - does NOT auto-apply scaffold`,
            {
                n8nJson: z.any().describe('n8n workflow JSON object or string export'),
                workflow: z.object({
                    name: z.string().optional(),
                    goal: z.string().optional(),
                    description: z.string().optional(),
                    pathname: z.string().optional(),
                }).optional().describe('Optional metadata overrides for the created workflow'),
                options: z.record(z.string(), z.any()).optional().describe('Optional import options'),
                locale: z.string().optional().describe('Locale for workflow creation (default en)'),
            },
            async ({ n8nJson, workflow, options, locale }, extra) => {
                const client = clientFactory(extra);
                const result = await client.importN8nWorkflow(n8nJson, workflow, options, locale);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • The underlying implementation that performs the actual network request to the Agentled API to import an n8n workflow.
    async importN8nWorkflow(
        n8nJson: string | Record<string, any>,
        workflow?: { name?: string; goal?: string; description?: string; pathname?: string },
        options?: Record<string, any>,
        locale?: string
    ) {
        return this.request('/workflows/import/n8n/create', {
            method: 'POST',
            body: JSON.stringify({ n8nJson, workflow, options, locale }),
        });
    }
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral details: it runs a 'deterministic import preview,' creates in 'preflight draft mode,' stores an 'imported contract for review/approval,' and explicitly states it 'does NOT auto-apply scaffold.' This covers key operational traits like safety (draft mode) and limitations (no auto-scaffold), though it omits details like error handling or permissions.

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 highly concise and well-structured: a clear purpose statement followed by a bulleted list of key behaviors. Each bullet adds essential information without redundancy, making it easy to scan and understand quickly.

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?

Given the tool's complexity (import with 4 parameters, nested objects, no output schema) and no annotations, the description is mostly complete. It explains the core behavior and limitations but could benefit from mentioning output format or error cases. However, it adequately covers the import process and draft creation for the context.

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 all parameters. The description adds no specific parameter semantics beyond implying 'n8nJson' is the import source and 'workflow' provides metadata overrides. This meets the baseline of 3, as the schema handles the heavy lifting without extra value from the description.

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 ('Create a new Agentled workflow from an n8n JSON import') and distinguishes it from siblings like 'create_workflow' (general creation) and 'import_workflow' (non-n8n import). It specifies the source format (n8n JSON) and target (Agentled workflow), making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description implies usage context by mentioning 'preflight draft mode' and 'does NOT auto-apply scaffold,' suggesting it's for initial import/review rather than immediate deployment. However, it lacks explicit guidance on when to use this versus alternatives like 'preview_n8n_import' (preview only) or 'create_workflow' (manual creation), leaving some ambiguity.

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