n8n - 💡(How to fix) Fix MCP Server Trigger validates against disabled tool schemas

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. Actual result (when bug triggers): Error Required at item_code (from the disabled get_item_tool)

Fix Action

Workaround

Remove the connection (not just disable the node). Disabling the node alone does NOT fix the issue -- the ai_tool link must be physically deleted.

Code Example

Received tool input did not match expected schema

Required
  at activity_code
RAW_BUFFERClick to expand / collapse

Bug Description

When a disabled toolWorkflow node is connected (via ai_tool connection) to an mcpTrigger node, the MCP Server validates ALL incoming tool calls against the disabled node's input schema instead of the targeted tool's schema.

This causes every tool call to fail with:

Received tool input did not match expected schema

Required
  at activity_code

...even when calling tools that do NOT have activity_code in their schema.

To reproduce

  1. Create a workflow with an mcpTrigger (typeVersion 2)
  2. Connect multiple toolWorkflow (typeVersion 2.2) nodes via ai_tool connections
  3. Disable one of the tool nodes (e.g., one that has activity_code as a required field)
  4. Keep the ai_tool connection between the disabled node and the MCP trigger
  5. Call ANY other connected (enabled) tool via MCP

Result: All tools fail validation with the disabled tool's required fields.

Expected: Disabled tools should be excluded from the MCP tool registry, OR their schemas should not interfere with other tools' validation.

Workaround

Remove the connection (not just disable the node). Disabling the node alone does NOT fix the issue -- the ai_tool link must be physically deleted.

Environment

  • Node types: @n8n/n8n-nodes-langchain.mcpTrigger (typeVersion: 2) + @n8n/n8n-nodes-langchain.toolWorkflow (typeVersion: 2.2)
  • n8n version: 2.20.9

To Reproduce

Note: This bug does NOT reproduce every time a disabled node is connected. The exact trigger condition has not been fully identified. However, once the bug manifests, it is 100% consistent until the connection is removed.

Sample :

  1. Call search_tool via MCP with { "q": "test" }
  2. Actual result (when bug triggers): Error Required at item_code (from the disabled get_item_tool)
  3. Expected result: search_tool executes successfully since q is optional
  4. Fix: Remove the connection from get_item_tool to the trigger -> search_tool works immediately

Expected behavior

When a tool node is disabled, the MCP Server Trigger should either:

Exclude it entirely from the MCP tool registry (not listed, not callable), OR Ignore its schema during input validation of other tools. Currently: A disabled node's required fields are incorrectly applied to validate ALL incoming tool calls, causing every tool to fail with schema errors from the disabled node.

Debug Info

The MCP Server Trigger appears to build an incorrect validation schema when disabled nodes remain connected. Instead of filtering out disabled nodes from the tool registry, it either:

  • Uses a disabled node's schema for validation of all tool calls, OR
  • Merges all connected nodes' required fields into a single validation schema

The validation happens at the trigger level (before any sub-workflow execution), confirming the sub-workflows are never invoked.

Operating System

Docker

n8n Version

2.20.9

Node.js Version

last

Database

PostgreSQL

Execution mode

queue

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When a tool node is disabled, the MCP Server Trigger should either:

Exclude it entirely from the MCP tool registry (not listed, not callable), OR Ignore its schema during input validation of other tools. Currently: A disabled node's required fields are incorrectly applied to validate ALL incoming tool calls, causing every tool to fail with schema errors from the disabled node.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix MCP Server Trigger validates against disabled tool schemas