From daaf481b84f94a9661f2ec1afbd62f5733dd85af Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Wed, 7 Jan 2026 19:29:21 +0000 Subject: [PATCH 1/2] Make ui.resourceUri optional (for tools that just need visibility) --- src/spec.types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spec.types.ts b/src/spec.types.ts index 5b7135ba2..a060bfa06 100644 --- a/src/spec.types.ts +++ b/src/spec.types.ts @@ -549,12 +549,12 @@ export type McpUiToolVisibility = "model" | "app"; */ export interface McpUiToolMeta { /** - * URI of the UI resource to display for this tool. + * URI of the UI resource to display for this tool, if any. * This is converted to `_meta["ui/resourceUri"]`. * * @example "ui://weather/widget.html" */ - resourceUri: string; + resourceUri?: string; /** * @description Who can access this tool. Default: ["model", "app"] * - "model": Tool visible to and callable by the agent From 6bee5556789e5495d78791bb4e59c6065219c1c2 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Wed, 7 Jan 2026 19:34:49 +0000 Subject: [PATCH 2/2] chore: regenerate schemas for optional resourceUri --- src/generated/schema.json | 1 - src/generated/schema.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/generated/schema.json b/src/generated/schema.json index 995eb4dd1..5143214a6 100644 --- a/src/generated/schema.json +++ b/src/generated/schema.json @@ -4047,7 +4047,6 @@ } } }, - "required": ["resourceUri"], "additionalProperties": false }, "McpUiToolResultNotification": { diff --git a/src/generated/schema.ts b/src/generated/schema.ts index bc415e51e..bd94075e8 100644 --- a/src/generated/schema.ts +++ b/src/generated/schema.ts @@ -484,12 +484,12 @@ export const McpUiToolVisibilitySchema = z */ export const McpUiToolMetaSchema = z.object({ /** - * URI of the UI resource to display for this tool. + * URI of the UI resource to display for this tool, if any. * This is converted to `_meta["ui/resourceUri"]`. * * @example "ui://weather/widget.html" */ - resourceUri: z.string(), + resourceUri: z.string().optional(), /** * @description Who can access this tool. Default: ["model", "app"] * - "model": Tool visible to and callable by the agent