using System.Text.Json.Nodes; using System.Text.Json.Serialization; namespace ModelContextProtocol.Protocol; /// /// Provides a base class for result payloads. /// public abstract class Result { /// Prevent external derivations. private protected Result() { } /// /// Gets or sets metadata reserved by MCP for protocol-level metadata. /// /// /// Implementations must not make assumptions about its contents. /// [JsonPropertyName("_meta")] public JsonObject? Meta { get; set; } /// /// Gets or sets the type of the result, which allows the client to determine how to parse the result object. /// /// /// /// When absent or set to "complete", the result is a normal completed response. /// When set to "input_required", the result is an indicating /// that additional input is needed before the request can be completed. /// When set to "task", the result is a indicating that the server /// has created a long-running task in lieu of returning the result directly. /// /// /// Defaults to , which is equivalent to "complete". [JsonPropertyName("resultType")] public string? ResultType { get; set; } }