File tree Expand file tree Collapse file tree
tests/ModelContextProtocol.Tests/Server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ public void OutputSchema_Attribute_WithType_GeneratesSchema()
659659 [ Fact ]
660660 public async Task OutputSchema_Attribute_CallToolResult_PreservesStructuredContent ( )
661661 {
662- McpServerTool tool = McpServerTool . Create ( ToolWithOutputSchemaReturningCallToolResult ) ;
662+ McpServerTool tool = McpServerTool . Create ( ToolWithOutputSchemaAttribute ) ;
663663
664664 Assert . NotNull ( tool . ProtocolTool . OutputSchema ) ;
665665 Assert . Equal ( "object" , tool . ProtocolTool . OutputSchema . Value . GetProperty ( "type" ) . GetString ( ) ) ;
@@ -791,17 +791,6 @@ private static CallToolResult ToolWithOutputSchemaAttribute()
791791 } ;
792792 }
793793
794- [ McpServerTool ( UseStructuredContent = true , OutputSchema = typeof ( Person ) ) ]
795- private static CallToolResult ToolWithOutputSchemaReturningCallToolResult ( )
796- {
797- var person = new Person ( "John" , 27 ) ;
798- return new CallToolResult ( )
799- {
800- Content = [ new TextContentBlock { Text = $ "{ person . Name } , { person . Age } " } ] ,
801- StructuredContent = JsonSerializer . SerializeToElement ( person , McpJsonUtilities . DefaultOptions ) ,
802- } ;
803- }
804-
805794 [ McpServerTool ( UseStructuredContent = false , OutputSchema = typeof ( Person ) ) ]
806795 private static CallToolResult ToolWithOutputSchemaButNoStructuredContent ( )
807796 {
You can’t perform that action at this time.
0 commit comments