Skip to content

Commit 918c601

Browse files
committed
fix(server): update elicitation changeset packages
1 parent a5ba576 commit 918c601

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.changeset/standard-schema-elicitation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
'@modelcontextprotocol/core': minor
2+
'@modelcontextprotocol/core-internal': minor
33
'@modelcontextprotocol/server': minor
4+
'@modelcontextprotocol/client': minor
45
---
56

67
Allow form elicitation requests to accept Standard Schema values such as Zod objects for `requestedSchema`. The server converts these schemas to MCP's restricted elicitation JSON Schema before sending and parses accepted content with the original schema before returning typed

examples/server/src/elicitationFormExample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const getServer = () => {
4141
try {
4242
const registrationSchema = z.object({
4343
username: z.string().min(3).max(20).meta({ title: 'Username', description: 'Your desired username (3-20 characters)' }),
44-
email: z.string().email().meta({ title: 'Email', description: 'Your email address' }),
44+
email: z.email().meta({ title: 'Email', description: 'Your email address' }),
4545
password: z.string().min(8).meta({ title: 'Password', description: 'Your password (min 8 characters)' }),
4646
newsletter: z.boolean().default(false).meta({ title: 'Newsletter', description: 'Subscribe to newsletter?' })
4747
});

packages/server/test/server/jsonSchemaValidatorOverride.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe('server JSON Schema validator overrides', () => {
135135

136136
const schema = z.object({
137137
count: z.coerce.number().min(1).meta({ title: 'Registration Count', description: 'Number of registrations to process' }),
138-
email: z.string().email().meta({ title: 'Email', description: 'Email address' }),
138+
email: z.email().meta({ title: 'Email', description: 'Email address' }),
139139
startsAt: z.iso.datetime({ offset: true }).meta({ title: 'Start Time' }),
140140
newsletter: z.boolean().default(false)
141141
});

0 commit comments

Comments
 (0)