Describe the problem/error/question
The MCP Client sends additional parameters along with what is defined in the mcp tool. My custom MCP tool has this defined:
@mcp.tool()
def create_support_ticket(user_email: str, subject: str, error_log: str) → str:
“”"
Creates a new OPEN support ticket for a user. Returns a structured JSON object with ticket details AND user contact info.“”"
This is a MCP Server using FastMCP/Python and it is using HTTP Streaming (not the deprecated SSE) as the “Server Transport”.
The AI agent with MCP Client Tool attached would pass along “user_email”, “subject”, “error_log”, AND “sessionId”, “action”, “toolCallId”, “chatInput”. The last 4 is unexpected and a bit surprising. I can’t see any options in the MCP Client Tool to not include this metadata. I can see why it would be useful to pass it along.
(note: I solved the issue for my needs by adapting the tool to accept these additional parameters, but I don’t know why this is happening.)
I looked intto the MCP Client Tool documentation from n8n, but I don’t see anything about this. Tweaking the system prompt as a rule for the AI agent did not help either.
What is the error message (if any)?
type:text
text:4 validation errors for call[create_support_ticket]\nsessionId\n Unexpected keyword argument [type=unexpected_keyword_argument, input_value=‘e7ea107d688949899f429bb04e86850b’, input_type=str]\n For further information visit Redirecting... Unexpected keyword argument [type=unexpected_keyword_argument, input_value=‘sendMessage’, input_type=str]\n For further information visit Redirecting... Unexpected keyword argument [type=unexpected_keyword_argument, input_value=‘yes’, input_type=str]\n For further information visit Redirecting... Unexpected keyword argument [type=unexpected_keyword_argument, input_value=‘call_gL0gdhb7lZUq6ci31iLaxNvH’, input_type=str]\n For further information visit Redirecting...
Fortunately, the log is clear. I can see that it’s sending along “sessionId”, “action”, “toolCallId”, “chatInput” and the tool does not expect them.
My question is whether this is expected behavior when wiring an MCP Client Tool to an AI agent?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version: Using the n8n cloud
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: