using System.Text.Json.Serialization; namespace McpDotNet.Protocol.Messages; /// /// An error response message in the JSON-RPC protocol. /// public record JsonRpcError : IJsonRpcMessageWithId { /// /// JSON-RPC protocol version. Always "2.0". /// [JsonPropertyName("jsonrpc")] public string JsonRpc { get; init; } = "2.0"; /// /// Request identifier matching the original request. /// [JsonPropertyName("id")] public required RequestId Id { get; init; } /// /// Error information. /// [JsonPropertyName("error")] public required JsonRpcErrorDetail Error { get; init; } }