It seems there isn't validation around tool names. Certain invalid names can cause LLMs to fail.

Expected Behavior Some type of @Tool annotation value validation is done to preemptively catch problems

Current Behavior An invalid tool name (such as having a space in the name) is permitted

Context

An invalid tool name (such as having a space in the name) causes the LLM to fail (GPT 4.1-mini in this case).

Expected a string that matches the pattern '^[a-zA-Z0-9_\.-]+$'."

Comment From: sunyuhan1998

This is indeed an issue, but here's the thing: perhaps different models have varying requirements and constraints regarding tool names. Should we perform uniform, standardized validation of tool names when creating the tools, or should we conduct the actual validation based on each model's specific requirements at execution time? @ilayaperumalg What's your opinion?