File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed
Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments