diff --git a/examples/simple-server/src/ui-react.tsx b/examples/simple-server/src/ui-react.tsx index a8239e93..45275fff 100644 --- a/examples/simple-server/src/ui-react.tsx +++ b/examples/simple-server/src/ui-react.tsx @@ -37,7 +37,7 @@ export function McpClientApp() { try { const result = await app.callServerTool({ name: "get-weather", - arguments: { city: "Tokyo" }, + arguments: { location: "Tokyo" }, }); setMessages((prev) => [ ...prev, diff --git a/src/app-bridge.ts b/src/app-bridge.ts index 90756a7a..c8d5345f 100644 --- a/src/app-bridge.ts +++ b/src/app-bridge.ts @@ -1,5 +1,5 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; -import { ZodLiteral, ZodObject } from "zod"; +import { ZodLiteral, ZodObject } from "zod/v4"; import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js"; import { diff --git a/src/types.ts b/src/types.ts index d58bfc5c..0ee4382c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,7 +7,7 @@ import { RequestSchema, ToolSchema, } from "@modelcontextprotocol/sdk/types.js"; -import { z } from "zod"; +import { z } from "zod/v4"; export const LATEST_PROTOCOL_VERSION = "2025-11-21"; @@ -77,7 +77,7 @@ export type McpUiSizeChangeNotification = z.infer< export const McpUiToolInputNotificationSchema = z.object({ method: z.literal("ui/notifications/tool-input"), params: z.object({ - arguments: z.record(z.unknown()).optional(), + arguments: z.record(z.string(), z.unknown()).optional(), }), }); export type McpUiToolInputNotification = z.infer< @@ -87,7 +87,7 @@ export type McpUiToolInputNotification = z.infer< export const McpUiToolInputPartialNotificationSchema = z.object({ method: z.literal("ui/notifications/tool-input-partial"), params: z.object({ - arguments: z.record(z.unknown()).optional(), + arguments: z.record(z.string(), z.unknown()).optional(), }), }); export type McpUiToolInputPartialNotification = z.infer<