Skip to content

Commit 37df670

Browse files
committed
more useful comments
1 parent c23cbf8 commit 37df670

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/mcp/server/fastmcp/utilities/func_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def func_metadata(
271271
output_info = FieldInfo.from_annotation(_get_typed_annotation(sig.return_annotation, globalns))
272272
annotation = output_info.annotation
273273

274-
# if the typehint is CallToolResult, the user intends to return it directly
274+
# if the typehint is CallToolResult, the user intends to return it directly without validation
275275
if isinstance(annotation, type) and issubclass(annotation, CallToolResult):
276276
return FuncMetadata(arg_model=arguments_model)
277277

src/mcp/server/lowlevel/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ async def handler(req: types.CallToolRequest):
505505
unstructured_content: UnstructuredContent
506506
maybe_structured_content: StructuredContent | None
507507
if isinstance(results, types.CallToolResult):
508-
# tool returned a CallToolResult so we'll skip further validation and return it directly
509508
return types.ServerResult(results)
510509
elif isinstance(results, tuple) and len(results) == 2:
511510
# tool returned both structured and unstructured content

0 commit comments

Comments
 (0)