Overview
Returns a function to request LLM completions from the host via MCPsampling/createMessage. The host decides which model to use and may modify or reject the request.
Check getHostCapabilities()?.sampling before calling. For tool-augmented completions, check ?.sampling?.tools.
Import
Signature
CreateSamplingMessageParams
Standard MCPCreateMessageRequest params:
Returns
Function to request an LLM completion.