You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems that the validation regex did not include pattern as "tavily-search".
def validate_tool_use_name(tool: ToolUse) -> None:
"""Validate the name of a tool use.
Args:
tool: The tool use to validate.
Raises:
InvalidToolUseNameException: If the tool name is invalid.
"""
# We need to fix some typing here, because we dont actually expect a ToolUse, but dict[str, Any]
if "name" not in tool:
message = "tool name missing" # type: ignore[unreachable]
logger.warning(message)
raise InvalidToolUseNameException(message)
tool_name = tool["name"]
tool_name_pattern = r"^[a-zA-Z][a-zA-Z0-9_]*$"
Expected Behavior
should pass the validation, as tavily mcp is widely used in agents
Actual Behavior
failed to pass the name validation
Additional Context
No response
Possible Solution
tool_name_pattern = r"^[a-zA-Z][a-zA-Z0-9_-]*$" # Added hyphen to allowed characters
Related Issues
No response
The text was updated successfully, but these errors were encountered:
Checks
Strands Version
0.1.2
Python Version
3.13.2
Operating System
ubuntu
Installation Method
pip
Steps to Reproduce
I am buiding a agent with MCP server from tavily search https://docs.tavily.com/documentation/mcp
however it raises exception :
than I looked at the code,
sdk-python/src/strands/tools/tools.py
Line 50 in 912e110
it seems that the validation regex did not include pattern as "tavily-search".
Expected Behavior
should pass the validation, as tavily mcp is widely used in agents
Actual Behavior
failed to pass the name validation
Additional Context
No response
Possible Solution
tool_name_pattern = r"^[a-zA-Z][a-zA-Z0-9_-]*$" # Added hyphen to allowed characters
Related Issues
No response
The text was updated successfully, but these errors were encountered: