Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Generate Security Audit

n8n_generate_audit
Read-onlyIdempotent

Generate security audit reports for n8n workflows and configurations to identify potential risks and issues across credentials, databases, nodes, and instance settings.

Instructions

Generate a security audit report for the n8n instance.

Args:

  • categories (array, optional): Categories to audit:

    • credentials: Check credential security

    • database: Check database configuration

    • filesystem: Check file system access

    • instance: Check instance configuration

    • nodes: Check node security

  • daysAbandonedWorkflow (number, optional): Days to consider workflow abandoned

Returns: Audit report with risk levels and issues by category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoriesNoCategories to audit (default: all)
daysAbandonedWorkflowNoDays to consider workflow abandoned

Implementation Reference

  • Implementation of the n8n_generate_audit tool, which registers the tool and defines its execution logic (a POST request to /audit).
      server.registerTool(
        'n8n_generate_audit',
        {
          title: 'Generate Security Audit',
          description: `Generate a security audit report for the n8n instance.
    
    Args:
      - categories (array, optional): Categories to audit:
        - credentials: Check credential security
        - database: Check database configuration
        - filesystem: Check file system access
        - instance: Check instance configuration
        - nodes: Check node security
      - daysAbandonedWorkflow (number, optional): Days to consider workflow abandoned
    
    Returns:
      Audit report with risk levels and issues by category.`,
          inputSchema: GenerateAuditSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof GenerateAuditSchema>) => {
          const result = await post<N8nAuditResult>('/audit', params);
          
          const riskEmoji = {
            high: '🔴',
            medium: '🟡',
            low: '🟢'
          };
          
          const sections = result.sections.map(section => {
            const issues = section.issues.length > 0
              ? section.issues.map(i => `    - ${i}`).join('\n')
              : '    No issues found';
            
            return `${riskEmoji[section.risk]} **${section.name}** (${section.risk} risk)\n${issues}`;
          }).join('\n\n');
          
          const text = [
            `**Security Audit Report**`,
            `Overall Risk: ${riskEmoji[result.risk]} ${result.risk.toUpperCase()}`,
            '',
            sections
          ].join('\n');
          
          return {
            content: [{ type: 'text', text }],
            structuredContent: result
          };
        }
      );
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds valuable context about what the tool generates (audit report with risk levels and issues by category) and mentions the 'daysAbandonedWorkflow' parameter which suggests time-based analysis behavior. This provides useful behavioral insight beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, args, returns). It's appropriately sized with no redundant information. Every sentence serves a purpose, though the parameter listing in the description slightly duplicates schema information.

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 read-only tool with comprehensive annotations and full schema coverage, the description provides adequate context. It explains the output format (audit report with risk levels and issues by category) which compensates for the lack of output schema. The tool's purpose and return value are clearly communicated given its complexity level.

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%, with both parameters well-documented in the schema. The description adds minimal value beyond the schema: it lists the category options (already in the enum) and mentions 'daysAbandonedWorkflow' but doesn't provide additional semantic context. Baseline 3 is appropriate 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 ('Generate a security audit report') and resource ('for the n8n instance'), distinguishing it from sibling tools that focus on workflows, credentials, projects, etc. It provides a precise verb+resource combination that immediately communicates the tool's function.

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

Usage Guidelines3/5

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

The description implies usage context (security auditing of an n8n instance) but doesn't explicitly state when to use this tool versus alternatives. It doesn't mention prerequisites, dependencies, or compare with other audit-related tools (none exist in siblings). The guidance is implied rather than explicit.

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/DrBalls/n8n-mcp-server-v2'

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