mcp: fix the type of the Complete handler

The Complete handler was returning an abstract Result type, rather than concrete CompleteResult type.

Fixes #375
This commit is contained in:
Huabing (Robin) Zhao 2025-08-29 22:06:23 +08:00 • committed by GitHub
commit f6118aaace
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -407,7 +407,7 @@ func (s *Server) capabilities() *ServerCapabilities {
return caps
}
func (s *Server) complete(ctx context.Context, req *CompleteRequest) (Result, error) {
func (s *Server) complete(ctx context.Context, req *CompleteRequest) (*CompleteResult, error) {
if s.opts.CompletionHandler == nil {
return nil, jsonrpc2.ErrMethodNotFound
}