Expand description
MCP Sampling Protocol Types
This module defines types for sampling requests in MCP.
Structs§
- Create
Message Params - Parameters for sampling/createMessage request (per MCP spec)
- Create
Message Request - Complete sampling/createMessage request (matches TypeScript CreateMessageRequest interface)
- Create
Message Result - Result for sampling/createMessage (per MCP spec)
- Model
Preferences - Model preferences (per MCP spec)
- Sampling
Message - Sampling message (per MCP spec)
- Sampling
Request - Sampling request parameters
- Sampling
Result - Sampling response
Enums§
Traits§
- HasModel
Preferences - Trait for model preferences (from CreateMessageRequest spec)
- HasSampling
Config - Trait for sampling configuration (from CreateMessageRequest spec)
- HasSampling
Context - Trait for sampling context (from CreateMessageRequest spec)
- HasSampling
Message Metadata - Trait for sampling message metadata (role, content from MCP spec)
- Sampling
Definition - Complete MCP Sampling Creation - Build AI model interaction and completion systems.