Skip to main content
Glama

generate-audit

Generate security audits for n8n instances to identify vulnerabilities in credentials, database, nodes, filesystem, and instance configurations.

Instructions

Generate a security audit for your n8n instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
daysAbandonedWorkflowNo
categoriesNo

Implementation Reference

  • Handler function that executes the generate-audit tool by calling N8nClient.generateAudit and returning the audit results.
    case "generate-audit": {
      const { clientId, daysAbandonedWorkflow, categories } = args as {
        clientId: string;
        daysAbandonedWorkflow?: number;
        categories?: Array<'credentials' | 'database' | 'nodes' | 'filesystem' | 'instance'>;
      };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const audit = await client.generateAudit({ daysAbandonedWorkflow, categories });
        return {
          content: [{
            type: "text",
            text: JSON.stringify(audit, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • Input schema defining parameters for the generate-audit tool: clientId (required), optional daysAbandonedWorkflow and categories.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        daysAbandonedWorkflow: { type: "number" },
        categories: {
          type: "array",
          items: {
            type: "string",
            enum: ["credentials", "database", "nodes", "filesystem", "instance"]
          }
        }
      },
      required: ["clientId"]
    }
  • src/index.ts:830-848 (registration)
    Registration of the generate-audit tool in the listTools response, including name, description, and inputSchema.
    {
      name: "generate-audit",
      description: "Generate a security audit for your n8n instance.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          daysAbandonedWorkflow: { type: "number" },
          categories: {
            type: "array",
            items: {
              type: "string",
              enum: ["credentials", "database", "nodes", "filesystem", "instance"]
            }
          }
        },
        required: ["clientId"]
      }
    }
  • N8nClient method that performs the actual API call to generate the audit report via POST /audit.
    async generateAudit(options: {
      daysAbandonedWorkflow?: number;
      categories?: Array<'credentials' | 'database' | 'nodes' | 'filesystem' | 'instance'>;
    } = {}): Promise<N8nAuditResult> {
      return this.makeRequest<N8nAuditResult>('/audit', {
        method: 'POST',
        body: JSON.stringify({
          additionalOptions: {
            daysAbandonedWorkflow: options.daysAbandonedWorkflow,
            categories: options.categories,
          },
        }),
      });
    }
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions 'generate' but doesn't specify if this is a read-only operation, requires permissions, has side effects, or details output format. This is inadequate for a tool with potential security implications.

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 a single, efficient sentence with no wasted words, making it easy to parse. It's appropriately sized for the tool's apparent complexity, though this conciseness comes at the cost of detail.

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

Completeness2/5

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

For a tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It fails to explain inputs, behavioral traits, or output, making it insufficient for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'clientId', 'daysAbandonedWorkflow', or 'categories' mean or how they affect the audit, leaving key inputs undocumented.

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

Purpose4/5

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

The description clearly states the action ('generate') and resource ('security audit for your n8n instance'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list-executions' or 'get-workflow' that might also provide audit-related information, so it's not fully specific.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. Given sibling tools like 'list-executions' or 'get-workflow' that might offer related data, the description lacks context on prerequisites, timing, or exclusions, leaving usage unclear.

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

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