You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The URL is never dialed — `handler.fetch` serves the request in-process. For stdio-era
196
+
coverage, spawn `serveStdio` as a child process.
197
+
154
198
### Client cancellation on Streamable HTTP
155
199
156
200
On a 2026-07-28 Streamable HTTP connection, aborting an in-flight client request
@@ -227,12 +271,12 @@ toward a 2025-era peer, or any `tasks/*` method toward a 2026-era peer) throws
227
271
228
272
If you were on a v2 alpha and consumed wire schemas directly:
229
273
230
-
| v2-alpha pattern | Mechanical fix |
231
-
| --- | --- |
232
-
| parsing wire bytes with `EmptyResultSchema` that may carry `resultType`| strip `resultType` first (the schema now rejects it as an unknown key) |
233
-
|`specTypeSchemas` / `SpecTypeName` references to task message types or `RequestMetaEnvelope`| remove — these validators left the public set (the **types** remain importable) |
234
-
|`ClientRequest` / `ServerResult` / … aggregate types expected to include task members | use the individual deprecated `Task*` types — role aggregates are now the neutral (task-free) sets |
235
-
| relying on `isCallToolResult` to reject wire-only members | guards validate neutral shapes (loose passthrough); validate raw wire traffic with a transport-level parse |
| parsing wire bytes with `EmptyResultSchema` that may carry `resultType`| strip `resultType` first (the schema now rejects it as an unknown key)|
277
+
|`specTypeSchemas` / `SpecTypeName` references to task message types or `RequestMetaEnvelope`| remove — these validators left the public set (the **types** remain importable) |
278
+
|`ClientRequest` / `ServerResult` / … aggregate types expected to include task members | use the individual deprecated `Task*` types — role aggregates are now the neutral (task-free) sets|
279
+
| relying on `isCallToolResult` to reject wire-only members | guards validate neutral shapes (loose passthrough); validate raw wire traffic with a transport-level parse |
236
280
237
281
The `resultType` / `EmptyResultSchema` / `specTypeSchemas` rules above have **no v1.x
238
282
impact** — these members did not exist before 2026-07-28. The neutral-model wire
@@ -258,6 +302,10 @@ and the multi-round-trip retry fields (`inputResponses`, `requestState`).
258
302
-**`resultType` is gone from every public result type** (`Result`, `CallToolResult`,
259
303
`GetPromptResult`, …). The wire schemas keep parsing it, and the protocol layer
260
304
consumes it before results reach your code.
305
+
-**`DiscoverResult` strips its cache fields too.**`ttlMs` / `cacheScope` on
306
+
`server/discover` are wire-only — consumed by the client's response-cache layer and
307
+
absent from the public `DiscoverResult` type returned by `getDiscoverResult()`.
308
+
Tooling that displays the server's advertised cache policy must parse raw frames.
261
309
-**High-level methods return the named public types** (`client.callTool()` →
262
310
`Promise<CallToolResult>`, etc.). Handler return positions are unaffected.
263
311
-**Reserved envelope keys and retry fields appear in no public params/result type.**
@@ -287,11 +335,11 @@ The protocol layer enforces the same boundary at runtime:
287
335
288
336
**If you were on a v2 alpha** and read the wire shape directly:
289
337
290
-
| Pattern | Mechanical fix |
291
-
| --- | --- |
292
-
|`result.resultType` (typed read) | delete the read — the SDK consumes the field; results are complete when delivered |
293
-
|`Result['resultType']` type reference | remove; the member is no longer declared |
294
-
| return-type capture of `callTool` etc. | use the named public types (`CallToolResult`, `ListToolsResult`, …) |
|`throw new UrlElicitationRequiredError([…])`|`return inputRequired({ inputRequests: { id: inputRequired.elicitUrl({…}) } })`|
313
-
| handler shared across both eras | branch on the served era: keep the push-style call toward 2025-era requests, return `inputRequired(...)` toward 2026-07-28 requests |
360
+
|`throw new UrlElicitationRequiredError([…])`|`return inputRequired({ inputRequests: { id: inputRequired.elicitUrl({…}) } })`|
361
+
| handler shared across both eras | branch on the served era: keep the push-style call toward 2025-era requests, return `inputRequired(...)` toward 2026-07-28 requests|
314
362
315
363
`inputRequired` / `acceptedContent` / `InputRequiredSpec` are exported from
316
364
`@modelcontextprotocol/server`. On 2026-era requests the push-style APIs
@@ -429,15 +477,15 @@ The experimental tasks **interception** layer is removed entirely — see
0 commit comments