Tool handler calls mcpServer.RequestSampling() to request LLM completions
Sampling requests are handled directly by the client's sampling handler
Client Side
MockSamplingHandler - Implements the SamplingHandler interface
NewInProcessClientWithSamplingHandler() - Creates client with sampling support
The handler receives sampling requests and returns mock LLM responses
Running the Example
go run main.go
Expected Output
Tool result: LLM Response (model: mock-llm-v1): Mock LLM response to: 'What is the capital of France?'
Real LLM Integration
To integrate with a real LLM service (OpenAI, Anthropic, etc.), replace the MockSamplingHandler with an implementation that calls your preferred LLM API. See the client sampling documentation for examples with real LLM providers.