File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
src/ModelContextProtocol/Protocol/Types Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- namespace ModelContextProtocol . Protocol . Types ;
1+ using System . Text . Json . Serialization ;
2+
3+ namespace ModelContextProtocol . Protocol . Types ;
24
35/// <summary>
46/// A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
57/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
68/// </summary>
9+ [ JsonConverter ( typeof ( JsonStringEnumConverter < ContextInclusion > ) ) ]
710public enum ContextInclusion
811{
912 /// <summary>
1013 /// No context should be included.
1114 /// </summary>
15+ [ JsonStringEnumMemberName ( "none" ) ]
1216 None ,
1317
1418 /// <summary>
1519 /// Include context from the server that sent the request.
1620 /// </summary>
21+ [ JsonStringEnumMemberName ( "thisServer" ) ]
1722 ThisServer ,
1823
1924 /// <summary>
2025 /// Include context from all servers that the client is connected to.
2126 /// </summary>
27+ [ JsonStringEnumMemberName ( "allServers" ) ]
2228 AllServers
2329}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ namespace ModelContextProtocol.Protocol.Types;
77/// These map to syslog message severities, as specified in RFC-5424:
88/// https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1
99/// </summary>
10+ [ JsonConverter ( typeof ( JsonStringEnumConverter < LoggingLevel > ) ) ]
1011public enum LoggingLevel
1112{
1213 /// <summary>Detailed debug information, typically only valuable to developers.</summary>
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
66/// Represents the type of role in the conversation.
77/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
88/// </summary>
9+ [ JsonConverter ( typeof ( JsonStringEnumConverter < Role > ) ) ]
910public enum Role
1011{
1112 /// <summary>
You can’t perform that action at this time.
0 commit comments