| 1 | { |
| 2 | "description": "Streamable HTTP session handling. Pins Rust StreamableHttpTransport::send / HttpTransport::send / McpPool::call_tool_with_decision: initialize issues a session id that every later request carries, the negotiated (older) protocol revision rides on every request after initialize as MCP-Protocol-Version, a notifications/tools/list_changed arriving inside a call's SSE reply does NOT refresh the catalog (the Rust pool never reads it), a 404 stale-session refusal is replayed exactly once on a fresh session (the server never ran it) and the reconnect re-lists tools, while a JSON-RPC error that merely mentions an invalid session is NOT replayed.", |
| 3 | "server_name": "conformance", |
| 4 | "server_options": { |
| 5 | "numbered_sessions": true |
| 6 | }, |
| 7 | "record_requests": "full", |
| 8 | "server": { |
| 9 | "initialize": { |
| 10 | "result": { |
| 11 | "protocolVersion": "2025-03-26", |
| 12 | "serverInfo": { |
| 13 | "name": "session-fixture", |
| 14 | "version": "1.0.0" |
| 15 | }, |
| 16 | "capabilities": { |
| 17 | "tools": {} |
| 18 | } |
| 19 | } |
| 20 | }, |
| 21 | "tools/list": [ |
| 22 | { |
| 23 | "once": true, |
| 24 | "result": { |
| 25 | "tools": [ |
| 26 | { |
| 27 | "name": "echo", |
| 28 | "description": "Echo.", |
| 29 | "inputSchema": { |
| 30 | "type": "object" |
| 31 | } |
| 32 | }, |
| 33 | { |
| 34 | "name": "notify_tool", |
| 35 | "description": "Answers with a tools/list_changed notification.", |
| 36 | "inputSchema": { |
| 37 | "type": "object" |
| 38 | } |
| 39 | }, |
| 40 | { |
| 41 | "name": "session_error", |
| 42 | "description": "Answers with a JSON-RPC error that mentions the session.", |
| 43 | "inputSchema": { |
| 44 | "type": "object" |
| 45 | } |
| 46 | } |
| 47 | ] |
| 48 | } |
| 49 | }, |
| 50 | { |
| 51 | "result": { |
| 52 | "tools": [ |
| 53 | { |
| 54 | "name": "echo", |
| 55 | "description": "Echo.", |
| 56 | "inputSchema": { |
| 57 | "type": "object" |
| 58 | } |
| 59 | }, |
| 60 | { |
| 61 | "name": "notify_tool", |
| 62 | "description": "Answers with a tools/list_changed notification.", |
| 63 | "inputSchema": { |
| 64 | "type": "object" |
| 65 | } |
| 66 | }, |
| 67 | { |
| 68 | "name": "session_error", |
| 69 | "description": "Answers with a JSON-RPC error that mentions the session.", |
| 70 | "inputSchema": { |
| 71 | "type": "object" |
| 72 | } |
| 73 | }, |
| 74 | { |
| 75 | "name": "added_later", |
| 76 | "description": "Only advertised after a reconnect.", |
| 77 | "inputSchema": { |
| 78 | "type": "object" |
| 79 | } |
| 80 | } |
| 81 | ] |
| 82 | } |
| 83 | } |
| 84 | ], |
| 85 | "tools/call": [ |
| 86 | { |
| 87 | "match": { |
| 88 | "name": "notify_tool" |
| 89 | }, |
| 90 | "notifications": [ |
| 91 | { |
| 92 | "jsonrpc": "2.0", |
| 93 | "method": "notifications/tools/list_changed" |
| 94 | } |
| 95 | ], |
| 96 | "result": { |
| 97 | "content": [ |
| 98 | { |
| 99 | "type": "text", |
| 100 | "text": "notified" |
| 101 | } |
| 102 | ] |
| 103 | } |
| 104 | }, |
| 105 | { |
| 106 | "match": { |
| 107 | "name": "echo" |
| 108 | }, |
| 109 | "once": true, |
| 110 | "expire_session": true |
| 111 | }, |
| 112 | { |
| 113 | "match": { |
| 114 | "name": "echo" |
| 115 | }, |
| 116 | "result": { |
| 117 | "content": [ |
| 118 | { |
| 119 | "type": "text", |
| 120 | "text": "echo" |
| 121 | } |
| 122 | ] |
| 123 | } |
| 124 | }, |
| 125 | { |
| 126 | "match": { |
| 127 | "name": "session_error" |
| 128 | }, |
| 129 | "error": { |
| 130 | "code": -32000, |
| 131 | "message": "session invalid" |
| 132 | } |
| 133 | } |
| 134 | ] |
| 135 | }, |
| 136 | "steps": [ |
| 137 | { |
| 138 | "op": "catalog" |
| 139 | }, |
| 140 | { |
| 141 | "op": "call", |
| 142 | "tool": "mcp_conformance_notify_tool", |
| 143 | "input": {} |
| 144 | }, |
| 145 | { |
| 146 | "op": "catalog" |
| 147 | }, |
| 148 | { |
| 149 | "op": "call", |
| 150 | "tool": "mcp_conformance_echo", |
| 151 | "input": { |
| 152 | "text": "first" |
| 153 | } |
| 154 | }, |
| 155 | { |
| 156 | "op": "catalog" |
| 157 | }, |
| 158 | { |
| 159 | "op": "call", |
| 160 | "tool": "mcp_conformance_session_error", |
| 161 | "input": {} |
| 162 | }, |
| 163 | { |
| 164 | "op": "call", |
| 165 | "tool": "mcp_conformance_echo", |
| 166 | "input": { |
| 167 | "text": "after session error" |
| 168 | } |
| 169 | } |
| 170 | ] |
| 171 | } |
| 172 |