Class Nexus\Mcp\Schema\Request\CreateMessageRequest

final
readonly
extends JsonRpcRequest<array{jsonrpc: '2.0', id: (int|non-empty-string), method: 'sampling/createMessage', params: array{_meta?: array<string, mixed>, messages: list<template-type<SamplingMessage, Arrayable, 'T'>>, maxTokens: int<0, max>, modelPreferences?: template-type<ModelPreferences, Arrayable, 'T'>, systemPrompt?: non-empty-string, includeContext?: ('allServers'|'none'|'thisServer'), temperature?: float, stopSequences?: list<non-empty-string>, metadata?: array<string, mixed>}}>
implements ServerRequest

A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.

Methods
Methods inherited from Nexus\Mcp\Schema\Message\JsonRpcRequest
toArray()
Methods inherited from Nexus\Mcp\Schema\Request\Request
jsonSerialize()
Methods inherited from Nexus\Mcp\Schema\Message\Message
validateJsonRpc()
Constants inherited from Nexus\Mcp\Schema\Message\JsonRpcMessage
JSON_RPC_VERSION
Properties inherited from Nexus\Mcp\Schema\Message\JsonRpcRequest
$jsonrpc, $id
Properties inherited from Nexus\Mcp\Schema\Request\Request
$method, $params