parent
85cefc23ff
commit
c9ace236a0
1 changed files with 864 additions and 274 deletions
27
src/mcpdotnet/Protocol/Messages/JsonRpcNotification.cs
Normal file
27
src/mcpdotnet/Protocol/Messages/JsonRpcNotification.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
namespace McpDotNet.Protocol.Messages;
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// A notification message in the JSON-RPC protocol (a request that doesn't expect a response).
|
||||
/// </summary>
|
||||
public record JsonRpcNotification : IJsonRpcMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// JSON-RPC protocol version. Always "2.0".
|
||||
/// </summary>
|
||||
[JsonPropertyName("jsonrpc")]
|
||||
public string JsonRpc { get; init; } = "2.0";
|
||||
|
||||
/// <summary>
|
||||
/// Name of the notification method.
|
||||
/// </summary>
|
||||
[JsonPropertyName("method")]
|
||||
public required string Method { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional parameters for the notification.
|
||||
/// </summary>
|
||||
[JsonPropertyName("params")]
|
||||
public object? Params { get; init; }
|
||||
}
|
||||
Loading…
Reference in a new issue