Module sampling

Module sampling 

Source
Expand description

LLM sampling types

This module contains types for server-initiated LLM sampling:

  • MCP 2025-11-25: Basic text-based sampling
  • MCP 2025-11-25 draft (SEP-1577): + Tool calling support

Structs§

CreateMessageRequest
Create message request (for LLM sampling)
CreateMessageResult
Create message result
ModelHint
Model hint for selection (MCP 2025-11-25 compliant)
ModelPreferences
Model preferences for sampling (MCP 2025-11-25 compliant)
SamplingMessage
Sampling message structure
UsageStats
Usage statistics for sampling

Enums§

IncludeContext
Include context options for sampling
StopReason
Stop reason for generation