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:
parent
7f4aa4a0ce
commit
a817f61412
1 changed files with 17 additions and 19 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue