mcp: validation only for accept action (#766)

Fix: #758

- validate schema only for accept action
- add unit test
This commit is contained in:
FanOne 2026-01-29 00:06:06 +08:00 • committed by GitHub
commit b29ab52878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1218,6 +1218,10 @@ func (ss *ServerSession) Elicit(ctx context.Context, params *ElicitParams) (*Eli
return nil, err
}
if res.Action != "accept" {
return res, nil
}
if params.RequestedSchema == nil {
return res, nil
}