Skip to content

Commit ce40cc5

Browse files
docs: list removed schema.ts exports in migration guides
1 parent 7eaddba commit ce40cc5

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

docs/migration-SKILL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@ Note: the third argument (`metadata`) is required — pass `{}` if no metadata.
286286
| `{}` (empty) | `z.object({})` |
287287
| `undefined` (no schema) | `undefined` or omit the field |
288288

289+
### Removed core exports
290+
291+
| Removed from `@modelcontextprotocol/core` | Replacement |
292+
|---|---|
293+
| `schemaToJson(schema)` | `standardSchemaToJsonSchema(schema)` |
294+
| `parseSchemaAsync(schema, data)` | `validateStandardSchema(schema, data)` |
295+
| `SchemaInput<T>` | `StandardSchemaWithJSON.InferInput<T>` |
296+
| `getSchemaShape`, `getSchemaDescription`, `isOptionalSchema`, `unwrapOptionalSchema` | none (internal Zod introspection helpers) |
297+
289298
## 7. Headers API
290299

291300
Transport constructors and `RequestInfo.headers` now use the Web Standard `Headers` object instead of plain objects.

docs/migration.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,15 @@ This applies to:
262262
- `outputSchema` in `registerTool()`
263263
- `argsSchema` in `registerPrompt()`
264264

265+
**Removed Zod-specific helpers** from `@modelcontextprotocol/core` (use Standard Schema equivalents):
266+
267+
| Removed | Replacement |
268+
|---|---|
269+
| `schemaToJson(schema)` | `standardSchemaToJsonSchema(schema)` |
270+
| `parseSchemaAsync(schema, data)` | `validateStandardSchema(schema, data)` |
271+
| `SchemaInput<T>` | `StandardSchemaWithJSON.InferInput<T>` |
272+
| `getSchemaShape`, `getSchemaDescription`, `isOptionalSchema`, `unwrapOptionalSchema` | No replacement — these were Zod introspection helpers for the now-obsolete completion path |
273+
265274
### Host header validation moved
266275

267276
Express-specific middleware (`hostHeaderValidation()`, `localhostHostValidation()`) moved from the server package to `@modelcontextprotocol/express`. The server package now exports framework-agnostic functions instead: `validateHostHeader()`, `localhostAllowedHostnames()`,

0 commit comments

Comments
 (0)