Skip to main content

Module handler

Module handler 

Source
Expand description

Answering the requests a server sends the client.

Through 2025-11-25 a server can ask the client to run a model (sampling/createMessage), ask its user a question (elicitation/create) or list its roots (roots/list), and it does so as a JSON-RPC request on the response stream of whatever call needed the answer. The call is blocked until the client replies, so a client that declared one of these capabilities and then did not answer left the server’s tool waiting forever.

ServerRequestHandler is that answer. It is a port the caller implements: this crate cannot know what a person would say, and answering on their behalf would be inventing consent.

2026-07-28 removed server-to-client requests. The same three questions now arrive as an InputRequiredResult and are answered through call_resolving.

Structs§

ConnectOptions
What a connection declares and how it answers the server.
HandlerRefusal
Why a handler declined a request.

Traits§

ServerRequestHandler
Answers the requests a server sends the client.

Functions§

apply_elicitation_defaults
Fills in the default of every property an accepted elicitation omitted.