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
|`ctx.mcpReq.elicitInput(params, options?)`| Elicit user input (form or URL) |`server.elicitInput(...)` from within handler |
417
417
|`ctx.mcpReq.requestSampling(params, options?)`| Request LLM sampling from client |`server.createMessage(...)` from within handler |
418
418
419
-
## 11. Schema parameter on `request()` / `callTool()`is optional; removed from `send()`
419
+
## 11. Schema parameter on `request()` / `callTool()`/ `mcpReq.send()` is optional
420
420
421
-
`Protocol.request()`and `Client.callTool()` still accept a Zod result schema as the second argument (the v1 form), but it is optional for spec methods — the SDK resolves the schema internally from the method name. `BaseContext.mcpReq.send()` no longer takes a schema.
421
+
`Protocol.request()`, `BaseContext.mcpReq.send()`, and `Client.callTool()` still accept a result schema as the second argument (the v1 form), but for spec methods it is optional — the SDK resolves the schema internally from the method name. The schema argument remains the supported call form for custom (non-spec) methods.
422
422
423
423
```typescript
424
424
// v1: schema required
@@ -427,7 +427,7 @@ const result = await client.request({ method: 'tools/call', params: { ... } }, C
|`ctx.mcpReq.send(req, ResultSchema)`|unchanged (schema optional), or `ctx.mcpReq.send(req)`|
441
+
|`ctx.mcpReq.send(req, ResultSchema, options)`|unchanged, or `ctx.mcpReq.send(req, options)`|
442
442
|`client.callTool(params, CompatibilityCallToolResultSchema)`| unchanged (schema ignored), or `client.callTool(params)`|
443
443
|`client.callTool(params, schema, options)`| unchanged, or `client.callTool(params, options)`|
444
444
445
-
Remove unused schema imports: `CallToolResultSchema`, `CompatibilityCallToolResultSchema`, `ElicitResultSchema`, `CreateMessageResultSchema`, etc., when they were only used in `request()`/`send()`/`callTool()` calls.
445
+
For spec methods you can drop now-unused schema imports (`CallToolResultSchema`, `CompatibilityCallToolResultSchema`, `ElicitResultSchema`, `CreateMessageResultSchema`, etc.) when they were only used in `request()`/`send()`/`callTool()` calls.
446
446
447
447
If `CallToolResultSchema` was used for **runtime validation** (not just as a `request()` argument), replace with the `isCallToolResult` type guard:
### `Protocol.request()` and `Client.callTool()` schema parameter is now optional
400
+
### `Protocol.request()`, `ctx.mcpReq.send()`, and `Client.callTool()` schema parameter is now optional
401
401
402
-
The public `Protocol.request()` and `Client.callTool()` methods still accept a result schema argument, but for spec methods it is optional — the SDK resolves the correct schema internally from the method name. You no longer need to import result schemas
403
-
like `CallToolResultSchema` or `ElicitResultSchema` when making requests. (`BaseContext.mcpReq.send()` no longer accepts a schema; drop it.)
402
+
The public `Protocol.request()`, `BaseContext.mcpReq.send()`, and `Client.callTool()` methods still accept a result schema argument, but for spec methods it is optional — the SDK resolves the correct schema internally from the method name. You no longer need to import result schemas
403
+
like `CallToolResultSchema` or `ElicitResultSchema` when making spec-method requests. The schema argument remains the supported call form for custom (non-spec) methods.
0 commit comments