Table of Contents

Class JsonRpcResponse

Namespace
ModelContextProtocol.Protocol.Messages
Assembly
ModelContextProtocol.dll

A successful response message in the JSON-RPC protocol.

public class JsonRpcResponse : JsonRpcMessageWithId
Inheritance
JsonRpcResponse
Inherited Members

Remarks

Response messages are sent in reply to a request message and contain the result of the method execution. Each response includes the same ID as the original request, allowing the sender to match responses with their corresponding requests.

This class represents a successful response with a result. For error responses, see JsonRpcError.

Properties

Result

Gets the result of the method invocation.

[JsonPropertyName("result")]
public required JsonNode? Result { get; init; }

Property Value

JsonNode

Remarks

This property contains the result data returned by the server in response to the JSON-RPC method request.