class MCProtocol::CreateMessageRequestParams

Included Modules

Defined in:

mcprotocol/create_message_request.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(maxTokens : Int64, messages : Array(SamplingMessage), includeContext : CreateMessageRequestParamsIncludeContext | Nil = Nil, metadata : JSON::Any | Nil = Nil, modelPreferences : ModelPreferences | Nil = Nil, stopSequences : Array(String) | Nil = Nil, systemPrompt : String | Nil = Nil, temperature : Float64 | Nil = Nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def includeContext : CreateMessageRequestParamsIncludeContext | Nil #

A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.


[View source]
def maxTokens : Int64 #

The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.


[View source]
def messages : Array(SamplingMessage) #

[View source]
def metadata : JSON::Any | Nil #

Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.


[View source]
def modelPreferences : ModelPreferences | Nil #

The server's preferences for which model to select. The client MAY ignore these preferences.


[View source]
def stopSequences : Array(String) | Nil #

[View source]
def systemPrompt : String | Nil #

An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.


[View source]
def temperature : Float64 | Nil #

[View source]