pub enum McpState {
Connected {
protocol_version: String,
server: String,
tools: Vec<McpToolLine>,
},
Authenticating {
recovery: String,
},
Failed {
refusal: Box<AxError>,
},
}Expand description
The three answers a handshake can come back with.
Exhaustive rather than a flag beside an optional reason: “it is answering”, “it wants an account” and “it failed, and here is why” are three different things for a person to do next, and a shape that left the reason optional would let a failure travel without one.
Variants§
Connected
It answered, and here is everything it offers.
Fields
protocol_version: StringThe revision the far end agreed to, which is not always the one that was asked for.
tools: Vec<McpToolLine>Authenticating
It is up and it understood the request, and it wants an account this city does not hold yet. Its own state rather than a failure, because what a person does about it is sign in rather than check the address.
Failed
It did not answer, and the whole refusal travels: the action that failed, the subject it failed on, the stable code, and the recovery a person can act on.