Table of Contents

Class CreateMessageResult

Namespace
ModelContextProtocol.Protocol.Types
Assembly
ModelContextProtocol.dll

The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it. See the schema for details

public class CreateMessageResult
Inheritance
CreateMessageResult
Inherited Members

Properties

Content

Text or image content of the message.

[JsonPropertyName("content")]
public required Content Content { get; init; }

Property Value

Content

Model

The name of the model that generated the message.

[JsonPropertyName("model")]
public required string Model { get; init; }

Property Value

string

Role

The role of the user who generated the message.

[JsonPropertyName("role")]
public required string Role { get; init; }

Property Value

string

StopReason

The reason why sampling stopped, if known.

[JsonPropertyName("stopReason")]
public string? StopReason { get; init; }

Property Value

string