Invalid 'tools[0].function.name'

Invalid ‘tools[0].function.name’: string does not match pattern. Expected a string that matches the pattern ‘[1]+$’.

Always geting this error everytime I try to link the MCP Client tool, even after I rename it to something without any spaces or special characters


  1. a-zA-Z0-9_- ↩︎

Hi @Ricardo_Pereira1

Welcome to the community.

However I didn’t encounter this kind of issue.

Can you share what tool you are connecting in your MCP Server?

Hi there, I’m having a similiar issue. Heres is my base workflow:

And heres is my MCP server

Here is a sample of one of my tools connected to the MCP node:

This is the full error text:

Bad request - please check your parameters
Invalid 'tools[5].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.

And I got this also:

"error":{
   "message":"Invalid 'tools[5].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.",
   "type":"invalid_request_error",
   "param":"tools[5].function.name",
   "code":"invalid_value"
}

Any help would be of great value!

Thank you in advance!

Matias

Hey buddy! The issue is that your name in the MCP client has some characters that aren’t letters or numbers — maybe something from your local language or some punctuation. Try removing them and it should work.

2 Likes

Oh man, that did the trick. Thank you a lot.

I’m used to use any charecter I like to name my nodes that couldn’t see that coming.

Thank you, problem solved!

Matias

I spent 3 hours struggling, installing, and uninstalling things… it turned out the node name was “MCP - Tool” and the “-” was causing the error. You’re a genius!! Thanks a lot.