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
2 changed files with 210 additions and 68 deletions
18
mcp/testdata/conformance/server/discover.txtar
vendored
18
mcp/testdata/conformance/server/discover.txtar
vendored
|
|
@ -1,7 +1,7 @@
|
|||
The client sends a discover request
|
||||
carrying the required per-request _meta triple (protocolVersion, clientInfo,
|
||||
clientCapabilities), and the server replies with the protocol versions it
|
||||
supports, its capabilities, and its identity.
|
||||
The client sends a discover request carrying the per-request _meta
|
||||
(protocolVersion, clientInfo, clientCapabilities), and the server
|
||||
replies with the protocol versions it supports, its capabilities, and its
|
||||
identity via `_meta.io.modelcontextprotocol/serverInfo`.
|
||||
|
||||
-- client --
|
||||
{
|
||||
|
|
@ -22,6 +22,12 @@ supports, its capabilities, and its identity.
|
|||
"id": 1,
|
||||
"result": {
|
||||
"resultType": "complete",
|
||||
"_meta": {
|
||||
"io.modelcontextprotocol/serverInfo": {
|
||||
"name": "testServer",
|
||||
"version": "v1.0.0"
|
||||
}
|
||||
},
|
||||
"ttlMs": 0,
|
||||
"cacheScope": "public",
|
||||
"supportedVersions": [
|
||||
|
|
@ -33,10 +39,6 @@ supports, its capabilities, and its identity.
|
|||
],
|
||||
"capabilities": {
|
||||
"logging": {}
|
||||
},
|
||||
"serverInfo": {
|
||||
"name": "testServer",
|
||||
"version": "v1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
mcp/testdata/conformance/server/mrtr.txtar
vendored
12
mcp/testdata/conformance/server/mrtr.txtar
vendored
|
|
@ -45,6 +45,12 @@ confirmThenGreet
|
|||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"result": {
|
||||
"_meta": {
|
||||
"io.modelcontextprotocol/serverInfo": {
|
||||
"name": "testServer",
|
||||
"version": "v1.0.0"
|
||||
}
|
||||
},
|
||||
"content": null,
|
||||
"requestState": "step=1",
|
||||
"resultType": "input_required",
|
||||
|
|
@ -71,6 +77,12 @@ confirmThenGreet
|
|||
"jsonrpc": "2.0",
|
||||
"id": 2,
|
||||
"result": {
|
||||
"_meta": {
|
||||
"io.modelcontextprotocol/serverInfo": {
|
||||
"name": "testServer",
|
||||
"version": "v1.0.0"
|
||||
}
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
|
|
|
|||
Loading…
Reference in a new issue