Skip to content

MISSING_TOOL_DESCRIPTION false positive: Validator checks wrong property name for toolWorkflow, toolCode, and toolSerpApi nodes #477

@drbhatiasanjay

Description

@drbhatiasanjay

GitHub Issue: MISSING_TOOL_DESCRIPTION False Positive for toolWorkflow, toolCode, and toolSerpApi

Bug Report for czlonkowski/n8n-mcp


Issue Title

MISSING_TOOL_DESCRIPTION false positive: Validator checks wrong property name for toolWorkflow, toolCode, and toolSerpApi nodes


Description

The AI tool validators in src/services/ai-tool-validators.ts always check for node.parameters.toolDescription, but n8n uses different property names for different tool types:

Tool Type Actual n8n Property Validator Checks Result
toolHttpRequest toolDescription toolDescription ✅ Correct
toolWorkflow description toolDescription ❌ False positive
toolCode description toolDescription ❌ False positive
toolSerpApi options.description toolDescription ❌ False positive

This causes valid workflows with properly configured tool descriptions to fail validation with MISSING_TOOL_DESCRIPTION errors.


Steps to Reproduce

  1. Create a workflow with a toolWorkflow node (Call n8n Sub-Workflow Tool)
  2. Configure the description field with a valid description (e.g., "Delete a content source permanently from the knowledge base")
  3. Connect the tool to an AI Agent
  4. Run n8n_validate_workflow on the workflow

Expected: Validation passes (description is present)
Actual: Error: Workflow Tool "X" has no toolDescription. Add one to help the LLM know when to use this tool.


Evidence

n8n Node Schema (from get_node tool)

toolWorkflow uses description:

{
  "name": "description",
  "displayName": "Description",
  "type": "string",
  "path": "description"
}

toolHttpRequest uses toolDescription:

{
  "name": "toolDescription",
  "displayName": "Description",
  "type": "string",
  "path": "toolDescription"
}

toolCode uses description:

{
  "name": "description",
  "displayName": "Description",
  "type": "string",
  "path": "description"
}

Actual Workflow Data (with descriptions present)

// toolWorkflow node - has description but validator fails
{
  "name": "Add Content Source",
  "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
  "parameters": {
    "workflowId": { "value": "0RDJJbYpXmJK5adO", "mode": "list" },
    "description": "Add a new content source to the knowledge base..."  // ✅ Present!
  }
}

// toolSerpApi node - has options.description but validator fails
{
  "name": "Google SerpAPI",
  "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
  "parameters": {
    "options": {
      "description": "Search the web using Google to find additional resources..."  // ✅ Present!
    }
  }
}

Root Cause

In src/services/ai-tool-validators.ts, all validators use the same check:

// Line ~57, ~213, ~237, ~273, ~323, etc.
if (!node.parameters.toolDescription) {
  issues.push({
    severity: 'error',
    ...
    code: 'MISSING_TOOL_DESCRIPTION'
  });
}

But n8n's actual node schemas use different property names depending on the tool type.


Affected Validators

  1. validateWorkflowTool() - Line ~303
  2. validateCodeTool() - Line ~213
  3. validateSerpApiTool() - Line ~357
  4. validateVectorStoreTool() - Line ~237
  5. validateAIAgentTool() - Line ~273
  6. validateMCPClientTool() - Line ~323
  7. validateWikipediaTool() - Line ~377
  8. validateSearXngTool() - Line ~395

Suggested Fix

Create a helper function to check all possible description locations:

/**
 * Get tool description from node, checking all possible property locations
 * Different n8n tool types store descriptions in different places
 */
function getToolDescription(node: WorkflowNode): string | undefined {
  return (
    node.parameters.toolDescription ||      // HTTP Request Tool, Vector Store Tool
    node.parameters.description ||          // Workflow Tool, Code Tool, AI Agent Tool
    node.parameters.options?.description    // SerpApi, Wikipedia, SearXNG
  );
}

Then update each validator:

// Before (wrong):
if (!node.parameters.toolDescription) {

// After (correct):
const description = getToolDescription(node);
if (!description) {

Environment

  • n8n-mcp version: 2.28.8
  • n8n instance version: 1.121.3
  • Node types affected: toolWorkflow, toolCode, toolSerpApi (and potentially others)

Additional Context

This bug was discovered while validating the "Abhishek Basic Agentic5b" workflow which has 9 properly configured AI tools. 5 of them (all toolWorkflow and toolSerpApi nodes) incorrectly fail validation despite having valid descriptions.


Labels

bug, validation, ai-tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions