You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 39ec6e5
Browse filesBrowse the repository at this point in the historyBrowse files
Use case-sensitive ProtocolOptions for all protocol readers
Add McpJsonUtilities.ProtocolOptions, a cached read-only copy of DefaultOptions that matches property names case-sensitively, and use it wherever the SDK deserializes protocol messages through options rather than the source-generated context: the stdio client and server transports, the ASP.NET Core Streamable HTTP and SSE request reader, and the Tasks extension (task-based CallToolResult, InputRequest, InputResponse and error details).
DefaultOptions and caller-supplied options are still used for user-defined data. Its docs now point to ProtocolOptions and state that protocol types deserialized through DefaultOptions keep case-insensitive matching.
Signed-off-by: FenjuFu <[email protected]>
/// Creates default options to use for MCP-related serialization.
40
58
/// </summary>
59
+
/// <param name="propertyNameCaseInsensitive">Whether property names are matched case-insensitively.</param>
41
60
/// <returns>The configured options.</returns>
42
61
[UnconditionalSuppressMessage("ReflectionAnalysis","IL3050:RequiresDynamicCode",Justification="Converter is guarded by IsReflectionEnabledByDefault check.")]
43
62
[UnconditionalSuppressMessage("Trimming","IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access",Justification="Converter is guarded by IsReflectionEnabledByDefault check.")]
Message=$"{nameof(IMcpTaskStore)} is configured and the {nameof(McpServerHandlers.CallToolWithAlternateHandler)} returned IsAlternate = true. Use only one mechanism.",
0 commit comments