pub struct RootsCapability {
pub list_changed: bool,
pub deprecated: Option<DeprecationInfo>,
}Expand description
Capabilities related to filesystem roots.
§Deprecated in MCP 2026-07-28
Roots is Deprecated by SEP-2577, with an earliest removal of the first specification revision released on or after 2027-07-28. The documented migration path is to pass directories or files through tool parameters, resource URIs, or server configuration instead.
When list_changed is true, the client supports sending
notifications/roots/list_changed to inform the server that the
available roots have been modified. Servers should re-request the
roots list when they receive this notification.
§Example
use tower_mcp_types::protocol::RootsCapability;
// Client advertising roots with change notification support
let cap = RootsCapability { list_changed: true, deprecated: None };
assert!(cap.list_changed);
// The notification method is defined as a constant:
assert_eq!(
tower_mcp_types::protocol::notifications::ROOTS_LIST_CHANGED,
"notifications/roots/list_changed"
);Fields§
§list_changed: boolWhether the client supports roots list changed notifications
deprecated: Option<DeprecationInfo>SEP-2577: roots is deprecated in the 2026-07-28 protocol with a
12-month minimum support window. Servers that advertise roots
can attach a DeprecationInfo to signal to clients.
Trait Implementations§
Source§impl Clone for RootsCapability
impl Clone for RootsCapability
Source§fn clone(&self) -> RootsCapability
fn clone(&self) -> RootsCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more