We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84dcfbc commit 4c0cdecCopy full SHA for 4c0cdec
1 file changed
src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs
@@ -580,4 +580,22 @@ private static CallToolResult ConvertAIContentEnumerableToCallToolResult(IEnumer
580
IsError = allErrorContent && hasAny
581
};
582
}
583
+
584
+ private static JsonSerializerOptions GetSerializerOptions(JsonSerializerOptions? customOptions)
585
+ {
586
+ if (customOptions is null)
587
588
+ return McpJsonUtilities.DefaultOptions;
589
+ }
590
591
+ if (customOptions.TypeInfoResolver is not null)
592
593
+ return customOptions;
594
595
596
+ customOptions.TypeInfoResolverChain.Add(McpJsonUtilities.JsonContext.Default);
597
+ customOptions.TypeInfoResolverChain.Add(AIJsonUtilities.DefaultOptions.TypeInfoResolver!);
598
599
600
601
0 commit comments