mcp: update return meta in DiscoverResult (SEP-2575) (#1097)
This PR implements the latest changes introduced by https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3002
This commit is contained in:
parent
fa548d7401
commit
5cb8339210
1 changed files with 210 additions and 68 deletions
|
|
@ -2475,7 +2475,15 @@ func TestSetErrorPreservesContent(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
var ctrCmpOpts = []cmp.Option{cmpopts.IgnoreUnexported(CallToolResult{}, GetPromptResult{}, ReadResourceResult{})}
|
||||
var ctrCmpOpts = []cmp.Option{
|
||||
cmpopts.IgnoreUnexported(CallToolResult{}, GetPromptResult{}, ReadResourceResult{}),
|
||||
// Server responses under the >= 2026-07-28 protocol carry an auto-populated
|
||||
// [MetaKeyServerInfo] entry; tests that compare result bodies against
|
||||
// hand-crafted expected values should ignore it.
|
||||
cmpopts.IgnoreFields(CallToolResult{}, "Meta"),
|
||||
cmpopts.IgnoreFields(GetPromptResult{}, "Meta"),
|
||||
cmpopts.IgnoreFields(ReadResourceResult{}, "Meta"),
|
||||
}
|
||||
|
||||
// runSubscriptionsListenTest exercises the SEP-2575 auto-listen flow end-to-end
|
||||
// against the supplied transport pair. It captures every notification and the
|
||||
|
|
|
|||
Loading…
Reference in a new issue