pub fn client_capabilities(object: &Map<String, Value>) -> CapabilitySetExpand description
Reads a ClientCapabilities object as a CapabilitySet.
Public because SEP-2575’s per-request _meta carries the same object in a
different message, and reading it twice with two tables would be two
definitions of what a client is allowed to say. See
crate::application::mcp::request_meta.
The inverse of the client’s own renderer, and table-driven for the same
reason: Capability::as_str is a dot in a Rust name and two levels in
JSON, so a capability advertised under the wrong key is one this cannot see.
A peer that sent nothing is not an error — it advertised nothing, and an
empty set is what that means.
An unrecognised key is ignored rather than refused. The specification’s
extensibility point is experimental, and a client built against a later
revision may name capabilities this build has never heard of; refusing the
handshake over one would make every future client unconnectable.