Skip to main content
Glama

preview_n8n_import

Analyze n8n workflow JSON to preview import results, identify unsupported nodes, and generate readiness summary before actual import.

Instructions

Preview a deterministic n8n import from JSON. Returns:

  • normalized import hash and IR

  • mapped step graph

  • unsupported nodes + remediation

  • warnings/risks

  • draft workflow build contract and compiler readiness summary

This is a read-only preview and does not create any workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n8nJsonNon8n workflow JSON object or string export
optionsNoOptional import options (e.g. maxNodes, allowPartial)
workflowNoOptional workflow metadata overrides for preview contract

Implementation Reference

  • Registration of the 'preview_n8n_import' tool in the MCP server.
        server.tool(
            'preview_n8n_import',
            `Preview a deterministic n8n import from JSON. Returns:
    - normalized import hash and IR
    - mapped step graph
    - unsupported nodes + remediation
    - warnings/risks
    - draft workflow build contract and compiler readiness summary
    
    This is a read-only preview and does not create any workflow.`,
            {
                n8nJson: z.any().describe('n8n workflow JSON object or string export'),
                options: z.record(z.string(), z.any()).optional().describe('Optional import options (e.g. maxNodes, allowPartial)'),
                workflow: z.object({
                    name: z.string().optional(),
                    goal: z.string().optional(),
                    description: z.string().optional(),
                    pathname: z.string().optional(),
                }).optional().describe('Optional workflow metadata overrides for preview contract'),
            },
            async ({ n8nJson, options, workflow }, extra) => {
  • The handler for the 'preview_n8n_import' tool, which delegates to the client's previewN8nImport method.
    async ({ n8nJson, options, workflow }, extra) => {
        const client = clientFactory(extra);
        const result = await client.previewN8nImport(n8nJson, options, workflow);
        return {
            content: [{
                type: 'text' as const,
                text: JSON.stringify(result, null, 2),
            }],
  • The actual implementation of the 'previewN8nImport' method that executes the API request.
    async previewN8nImport(
        n8nJson: string | Record<string, any>,
        options?: Record<string, any>,
        workflow?: { name?: string; goal?: string; description?: string; pathname?: string }
    ) {
        return this.request('/workflows/import/n8n/preview', {
            method: 'POST',
            body: JSON.stringify({ n8nJson, options, workflow }),
        });
    }
Behavior3/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 does well by explicitly stating this is 'read-only' and 'does not create any workflow,' which clarifies safety and side effects. However, it lacks details on error handling, performance characteristics, rate limits, or authentication requirements that would be valuable for a tool processing JSON imports.

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: it starts with the core purpose, lists the return components in a clear bullet format, and ends with a crucial behavioral note. Every sentence earns its place, with no wasted words, making it easy to scan and understand.

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 (processing JSON imports with multiple return components) and lack of output schema, the description does a good job outlining what the tool returns. It lists five specific output components, which helps set expectations. However, without annotations or output schema, it could benefit from more detail on error cases or example outputs to be fully complete.

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 three parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain JSON format requirements or option details). This meets the baseline of 3 when the schema does the heavy lifting.

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 ('Preview a deterministic n8n import from JSON') and the resource involved (n8n workflow). It distinguishes from siblings like 'import_n8n_workflow' by emphasizing this is a read-only preview that doesn't create workflows, making the purpose highly specific and differentiated.

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 provides clear context for when to use this tool: to preview an n8n import without creating anything. It explicitly states 'This is a read-only preview and does not create any workflow,' which helps differentiate it from actual import tools. However, it doesn't explicitly mention when NOT to use it or name specific alternatives like 'import_n8n_workflow' for comparison.

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