Skip to content

Commit db63a78

Browse files
Remove redundant SEP-986 comments
1 parent 0575f2b commit db63a78

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/mcp/server/fastmcp/tools/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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>":

src/mcp/server/lowlevel/server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)