@@ -813,12 +813,9 @@ public async Task StructuredOutput_WithDuplicateTypeRefs_RewritesRefPointers()
813813 JsonSerializerOptions options = new ( ) { TypeInfoResolver = new DefaultJsonTypeInfoResolver ( ) } ;
814814 McpServerTool tool = McpServerTool . Create ( ( ) => data , new ( ) { Name = "tool" , UseStructuredContent = true , SerializerOptions = options } ) ;
815815 var mockServer = new Mock < McpServer > ( ) ;
816- var request = new RequestContext < CallToolRequestParams > ( mockServer . Object , CreateTestJsonRpcRequest ( ) )
817- {
818- Params = new CallToolRequestParams { Name = "tool" } ,
819- } ;
820-
821- var result = await tool . InvokeAsync ( request , TestContext . Current . CancellationToken ) ;
816+ var result = await tool . InvokeAsync (
817+ new RequestContext < CallToolRequestParams > ( mockServer . Object , CreateTestJsonRpcRequest ( ) , new ( ) { Name = "tool" } ) ,
818+ TestContext . Current . CancellationToken ) ;
822819
823820 Assert . NotNull ( tool . ProtocolTool . OutputSchema ) ;
824821 Assert . Equal ( "object" , tool . ProtocolTool . OutputSchema . Value . GetProperty ( "type" ) . GetString ( ) ) ;
@@ -858,12 +855,9 @@ public async Task StructuredOutput_WithRecursiveTypeRefs_RewritesRefPointers()
858855 JsonSerializerOptions options = new ( ) { TypeInfoResolver = new DefaultJsonTypeInfoResolver ( ) } ;
859856 McpServerTool tool = McpServerTool . Create ( ( ) => data , new ( ) { Name = "tool" , UseStructuredContent = true , SerializerOptions = options } ) ;
860857 var mockServer = new Mock < McpServer > ( ) ;
861- var request = new RequestContext < CallToolRequestParams > ( mockServer . Object , CreateTestJsonRpcRequest ( ) )
862- {
863- Params = new CallToolRequestParams { Name = "tool" } ,
864- } ;
865-
866- var result = await tool . InvokeAsync ( request , TestContext . Current . CancellationToken ) ;
858+ var result = await tool . InvokeAsync (
859+ new RequestContext < CallToolRequestParams > ( mockServer . Object , CreateTestJsonRpcRequest ( ) , new ( ) { Name = "tool" } ) ,
860+ TestContext . Current . CancellationToken ) ;
867861
868862 Assert . NotNull ( tool . ProtocolTool . OutputSchema ) ;
869863 Assert . Equal ( "object" , tool . ProtocolTool . OutputSchema . Value . GetProperty ( "type" ) . GetString ( ) ) ;
0 commit comments