pub struct DiscoverResult {
pub supported_versions: Vec<String>,
pub capabilities: ServerCapabilities,
pub ttl_ms: Option<u64>,
pub cache_scope: Option<CacheScope>,
pub instructions: Option<String>,
pub meta: Option<ResultMeta>,
}Expand description
Result of the server/discover RPC (SEP-2575).
Shape mirrors InitializeResult with the singular protocol_version
replaced by supported_versions – a server/discover call is
version-independent, so the server enumerates every version it can
speak and the client picks.
The final 2026-07-28 schema dropped the serverInfo body field (server
identity now lives in _meta["io.modelcontextprotocol/serverInfo"], via
ResultMeta) and made this a CacheableResult-shaped type (the spec’s
name for the interface; this crate has no such Rust type – each
cacheable result inlines its own ttl_ms/cache_scope fields). This
crate keeps ttl_ms/cache_scope as Option rather than the spec’s
required number/string – the same “None means no opinion”
convention used by every other cacheable result in this file (see
CacheScope) – rather than a one-off required-field type here.
Fields§
§supported_versions: Vec<String>All protocol versions this server can speak. The client picks one
and signals it via MCP-Protocol-Version on subsequent requests.
capabilities: ServerCapabilitiesServer capabilities (same shape as the initialize result).
ttl_ms: Option<u64>SEP-2549: client-cache TTL in milliseconds for this response.
None means “no opinion – client policy decides”.
cache_scope: Option<CacheScope>SEP-2549: scope the cached result applies to. None means scope is
unspecified.
instructions: Option<String>Optional instructions describing how to use this server.
meta: Option<ResultMeta>Protocol-level metadata. Carries server identity
(io.modelcontextprotocol/serverInfo) per SEP-2575.
Trait Implementations§
Source§impl Clone for DiscoverResult
impl Clone for DiscoverResult
Source§fn clone(&self) -> DiscoverResult
fn clone(&self) -> DiscoverResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more