-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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
- Create a workflow with a
toolWorkflownode (Call n8n Sub-Workflow Tool) - Configure the
descriptionfield with a valid description (e.g., "Delete a content source permanently from the knowledge base") - Connect the tool to an AI Agent
- Run
n8n_validate_workflowon 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
validateWorkflowTool()- Line ~303validateCodeTool()- Line ~213validateSerpApiTool()- Line ~357validateVectorStoreTool()- Line ~237validateAIAgentTool()- Line ~273validateMCPClientTool()- Line ~323validateWikipediaTool()- Line ~377validateSearXngTool()- 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