mcp: add Cacheable fields to DiscoverResult (#1022)

This PR add the Cacheable fields to the DiscoverResult, as it was added
later
(8e4c2322ca)
This commit is contained in:
Guglielmo Colombo 2026-06-24 14:08:43 +02:00 • committed by GitHub
commit a817f61412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -869,12 +869,14 @@ func (s *Server) discover(_ context.Context, req *ServerRequest[*DiscoverParams]
ClientInfo: req.ClientInfo(),
}
})
return &DiscoverResult{
res := &DiscoverResult{
SupportedVersions: versions,
Capabilities: s.capabilities(),
ServerInfo: s.impl,
Instructions: s.opts.Instructions,
}, nil
}
res.setDefaultCacheableValues()
return res, nil
}
// filterSupportedVersions returns the subset of [supportedProtocolVersions]