class

MCProtocol::CreateMessageRequestParams

Inherits JSON::Serializable < Reference < Object

Constructors

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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

includeContext

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.

Source
maxTokens

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

Source
messages
Source
metadata

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

Source
modelPreferences

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

Source
stopSequences
Source
systemPrompt

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

Source
temperature
Source