Expand description
Client handler traits for server-initiated requests.
MCP servers can initiate certain requests to clients, such as:
- Sampling: Request the client’s LLM to generate a response
- Elicitation: Request user input through the client
- Roots: Get file system roots that the client exposes
This module defines traits that clients can implement to handle these requests.
Structs§
- NoOp
Handler - A no-op handler that rejects all server requests.
- Root
- A root directory that the client exposes to servers.
- Sampling
Handler - A handler that supports sampling by delegating to a closure.
Traits§
- Client
Handler - Handler trait for server-initiated requests.