File tree Expand file tree Collapse file tree 2 files changed +0
-3
lines changed Expand file tree Collapse file tree 2 files changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ def from_function(
5757 """Create a Tool from a function."""
5858 func_name = name or fn .__name__
5959
60- # Validate tool name according to SEP-986 specification
6160 validate_and_warn_tool_name (func_name )
6261
6362 if func_name == "<lambda>" :
Original file line number Diff line number Diff line change @@ -423,7 +423,6 @@ async def handler(req: types.ListToolsRequest):
423423 if isinstance (result , types .ListToolsResult ): # pragma: no cover
424424 # Refresh the tool cache with returned tools
425425 for tool in result .tools :
426- # Validate tool name according to SEP-986 specification
427426 validate_and_warn_tool_name (tool .name )
428427 self ._tool_cache [tool .name ] = tool
429428 return types .ServerResult (result )
@@ -432,7 +431,6 @@ async def handler(req: types.ListToolsRequest):
432431 # Clear and refresh the entire tool cache
433432 self ._tool_cache .clear ()
434433 for tool in result :
435- # Validate tool name according to SEP-986 specification
436434 validate_and_warn_tool_name (tool .name )
437435 self ._tool_cache [tool .name ] = tool
438436 return types .ServerResult (types .ListToolsResult (tools = result ))
You can’t perform that action at this time.
0 commit comments