Module sampling

Module sampling 

Source
Expand description

MCP Sampling Protocol Types

This module defines types for sampling requests in MCP.

Structs§

CreateMessageParams
Parameters for sampling/createMessage request (per MCP spec)
CreateMessageRequest
Complete sampling/createMessage request (matches TypeScript CreateMessageRequest interface)
CreateMessageResult
Result for sampling/createMessage (per MCP spec)
ModelPreferences
Model preferences (per MCP spec)
SamplingMessage
Sampling message (per MCP spec)
SamplingRequest
Sampling request parameters
SamplingResult
Sampling response

Enums§

ModelHint
Model hint enum (per MCP spec)
Role
Role enum for messages (per MCP spec)

Traits§

HasModelPreferences
Trait for model preferences (from CreateMessageRequest spec)
HasSamplingConfig
Trait for sampling configuration (from CreateMessageRequest spec)
HasSamplingContext
Trait for sampling context (from CreateMessageRequest spec)
HasSamplingMessageMetadata
Trait for sampling message metadata (role, content from MCP spec)
SamplingDefinition
Complete MCP Sampling Creation - Build AI model interaction and completion systems.