From 637735782288533995e569407777be6ca6943dfb Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 12 Jan 2026 21:41:48 +0000 Subject: [PATCH 1/4] chore: remove tamper-detection.ts (not meant to be submitted) Follow-up to PR #234. This file was accidentally included. --- examples/basic-host/src/tamper-detection.ts | 325 -------------------- 1 file changed, 325 deletions(-) delete mode 100644 examples/basic-host/src/tamper-detection.ts diff --git a/examples/basic-host/src/tamper-detection.ts b/examples/basic-host/src/tamper-detection.ts deleted file mode 100644 index d1929489..00000000 --- a/examples/basic-host/src/tamper-detection.ts +++ /dev/null @@ -1,325 +0,0 @@ -/** - * Tamper Detection Module for MCP-UI Sandbox - * - * Generates a script that monitors security-sensitive JavaScript APIs - * and emits notifications when guest code accesses them. - */ - -export type TamperRuleTarget = - | "window" - | "Element.prototype" - | "Document.prototype" - | "Node.prototype" - | "HTMLElement.prototype" - | "EventTarget.prototype" - | "History.prototype" - | "Location.prototype"; - -export type TamperRuleType = "getter" | "method" | "both"; -export type TamperSeverity = "low" | "medium" | "high" | "critical"; - -export interface TamperRule { - target: TamperRuleTarget; - property: string; - type: TamperRuleType; - severity: TamperSeverity; -} - -export const TAMPER_DETECTED_NOTIFICATION = - "ui/notifications/tamper-detected" as const; - -/** - * Default rules for security-sensitive APIs. - * - critical: Access is blocked (returns undefined / throws) - * - high/medium/low: Access is allowed but an alert is emitted - */ -export const DEFAULT_TAMPER_RULES: TamperRule[] = [ - // === CRITICAL (blocked) === - // Escape attempts - { target: "window", property: "top", type: "getter", severity: "critical" }, - { - target: "window", - property: "parent", - type: "getter", - severity: "critical", - }, - { - target: "window", - property: "opener", - type: "getter", - severity: "critical", - }, - { - target: "window", - property: "frameElement", - type: "getter", - severity: "critical", - }, - // Code execution - { target: "window", property: "eval", type: "method", severity: "critical" }, - - // === HIGH (allowed with alert) === - { target: "window", property: "Function", type: "getter", severity: "high" }, - // Network/data exfiltration - { target: "window", property: "fetch", type: "method", severity: "high" }, - { - target: "window", - property: "XMLHttpRequest", - type: "getter", - severity: "high", - }, - { target: "window", property: "WebSocket", type: "getter", severity: "high" }, - { - target: "window", - property: "EventSource", - type: "getter", - severity: "high", - }, - // DOM injection (high-risk methods) - { - target: "Document.prototype", - property: "write", - type: "method", - severity: "high", - }, - { - target: "Document.prototype", - property: "writeln", - type: "method", - severity: "high", - }, - { - target: "Element.prototype", - property: "insertAdjacentHTML", - type: "method", - severity: "high", - }, - - // === MEDIUM (allowed with alert) === - // Storage access - { - target: "window", - property: "localStorage", - type: "getter", - severity: "medium", - }, - { - target: "window", - property: "sessionStorage", - type: "getter", - severity: "medium", - }, - { - target: "window", - property: "indexedDB", - type: "getter", - severity: "medium", - }, - { target: "window", property: "caches", type: "getter", severity: "medium" }, - // DOM injection (property-based) - { - target: "Element.prototype", - property: "innerHTML", - type: "both", - severity: "medium", - }, - { - target: "Element.prototype", - property: "outerHTML", - type: "both", - severity: "medium", - }, - // DOM traversal - { - target: "Node.prototype", - property: "parentNode", - type: "getter", - severity: "medium", - }, - { - target: "Node.prototype", - property: "parentElement", - type: "getter", - severity: "medium", - }, - { - target: "Element.prototype", - property: "closest", - type: "method", - severity: "medium", - }, - // History manipulation - { target: "window", property: "history", type: "getter", severity: "medium" }, - { - target: "window", - property: "location", - type: "getter", - severity: "medium", - }, - - // === LOW (allowed with alert) === - // Message passing - { - target: "window", - property: "postMessage", - type: "method", - severity: "low", - }, - // DOM queries - { - target: "Document.prototype", - property: "querySelector", - type: "method", - severity: "low", - }, - { - target: "Document.prototype", - property: "querySelectorAll", - type: "method", - severity: "low", - }, - { - target: "Document.prototype", - property: "getElementById", - type: "method", - severity: "low", - }, -]; - -/** - * Generates the tamper detection script as a string. - * This script should be injected into guest HTML before any other scripts run. - */ -export function generateTamperDetectionScript( - rules: TamperRule[] = DEFAULT_TAMPER_RULES, -): string { - const rulesJson = JSON.stringify(rules); - - return `(function() { - 'use strict'; - - var NOTIFICATION_METHOD = '${TAMPER_DETECTED_NOTIFICATION}'; - var rules = ${rulesJson}; - - function emitTamperAlert(rule, accessType, stackTrace) { - try { - window.parent.postMessage({ - jsonrpc: '2.0', - method: NOTIFICATION_METHOD, - params: { - property: rule.target + '.' + rule.property, - accessType: accessType, - severity: rule.severity, - blocked: rule.severity === 'critical', - timestamp: Date.now(), - stack: stackTrace - } - }, '*'); - } catch (e) { - // Silently fail if postMessage is unavailable - } - } - - function shouldBlock(rule) { - return rule.severity === 'critical'; - } - - function wrapProperty(target, prop, rule) { - var descriptor = Object.getOwnPropertyDescriptor(target, prop); - if (!descriptor) return false; - - var newDescriptor = { - configurable: false, - enumerable: descriptor.enumerable - }; - - var wrapped = false; - - if (rule.type === 'getter' || rule.type === 'both') { - var originalGetter = descriptor.get || (function() { return descriptor.value; }); - newDescriptor.get = function() { - emitTamperAlert(rule, 'read', new Error().stack); - if (shouldBlock(rule)) { - return undefined; - } - return originalGetter.call(this); - }; - wrapped = true; - } - - if (rule.type === 'method' && typeof descriptor.value === 'function') { - var originalMethod = descriptor.value; - newDescriptor.value = function() { - emitTamperAlert(rule, 'call', new Error().stack); - if (shouldBlock(rule)) { - throw new Error('Access to ' + rule.target + '.' + rule.property + ' is blocked'); - } - return originalMethod.apply(this, arguments); - }; - wrapped = true; - } - - if (rule.type === 'both' && descriptor.set) { - var originalSetter = descriptor.set; - newDescriptor.set = function(value) { - emitTamperAlert(rule, 'write', new Error().stack); - if (shouldBlock(rule)) { - return; - } - return originalSetter.call(this, value); - }; - } - - if (wrapped) { - try { - Object.defineProperty(target, prop, newDescriptor); - return true; - } catch (e) { - return false; - } - } - return false; - } - - function getTargetObject(targetName) { - switch (targetName) { - case 'window': return window; - case 'Element.prototype': return Element.prototype; - case 'Document.prototype': return Document.prototype; - case 'Node.prototype': return Node.prototype; - case 'HTMLElement.prototype': return HTMLElement.prototype; - case 'EventTarget.prototype': return EventTarget.prototype; - case 'History.prototype': return History.prototype; - case 'Location.prototype': return Location.prototype; - default: return null; - } - } - - // Install monitoring - for (var i = 0; i < rules.length; i++) { - var rule = rules[i]; - var target = getTargetObject(rule.target); - if (target) { - wrapProperty(target, rule.property, rule); - } - } -})();`; -} - -/** - * Injects a script into HTML content, ensuring it runs before any other scripts. - */ -export function injectScriptIntoHtml(html: string, script: string): string { - const scriptTag = ``; - - // Try first - if (html.includes("")) { - return html.replace("", `${scriptTag}`); - } - // Try - if (html.includes("")) { - return html.replace("", `${scriptTag}`); - } - // Fallback: prepend - return scriptTag + html; -} From 4276b9c9761164fefdbc2008e56378f2f968f042 Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 12 Jan 2026 21:42:03 +0000 Subject: [PATCH 2/4] revert to srcdoc Follow-up to PR #234 per domfarolino's review feedback. --- examples/basic-host/src/sandbox.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/examples/basic-host/src/sandbox.ts b/examples/basic-host/src/sandbox.ts index c6d7e033..6eb758a0 100644 --- a/examples/basic-host/src/sandbox.ts +++ b/examples/basic-host/src/sandbox.ts @@ -95,21 +95,9 @@ window.addEventListener("message", async (event) => { inner.setAttribute("allow", allowAttribute); } if (typeof html === "string") { - // Use document.write instead of srcdoc for WebGL compatibility. - // srcdoc creates an opaque origin which prevents WebGL canvas updates - // from being displayed properly. document.write preserves the sandbox - // origin, allowing WebGL to work correctly. - // CSP is enforced via HTTP headers on this page (sandbox.html). - const doc = inner.contentDocument || inner.contentWindow?.document; - if (doc) { - doc.open(); - doc.write(html); - doc.close(); - } else { - // Fallback to srcdoc if document is not accessible - console.warn("[Sandbox] document.write not available, falling back to srcdoc"); - inner.srcdoc = html; - } + inner.srcdoc = html; + } else { + console.error("[Sandbox] Missing or invalid HTML content in sandbox-resource-ready notification."); } } else { if (inner && inner.contentWindow) { From a44fba669becd82a1be844a39c6a89cf65a69f2a Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 12 Jan 2026 22:10:32 +0000 Subject: [PATCH 3/4] regen --- src/generated/schema.json | 658 +++++++------------------------------- 1 file changed, 109 insertions(+), 549 deletions(-) diff --git a/src/generated/schema.json b/src/generated/schema.json index 1d87d9c8..a3e72eb8 100644 --- a/src/generated/schema.json +++ b/src/generated/schema.json @@ -30,6 +30,7 @@ }, "McpUiDisplayMode": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Display mode for UI presentation.", "anyOf": [ { "type": "string", @@ -43,8 +44,7 @@ "type": "string", "const": "pip" } - ], - "description": "Display mode for UI presentation." + ] }, "McpUiHostCapabilities": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -261,6 +261,7 @@ "const": "ui/notifications/host-context-changed" }, "params": { + "description": "Partial context update containing only changed fields.", "type": "object", "properties": { "toolInfo": { @@ -281,6 +282,7 @@ ] }, "tool": { + "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -305,10 +307,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -406,8 +404,7 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false, - "description": "Tool definition including name, inputSchema, etc." + "additionalProperties": false } }, "required": ["tool"], @@ -434,6 +431,7 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -743,96 +741,17 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] }, "additionalProperties": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." - }, - "required": [ - "--color-background-primary", - "--color-background-secondary", - "--color-background-tertiary", - "--color-background-inverse", - "--color-background-ghost", - "--color-background-info", - "--color-background-danger", - "--color-background-success", - "--color-background-warning", - "--color-background-disabled", - "--color-text-primary", - "--color-text-secondary", - "--color-text-tertiary", - "--color-text-inverse", - "--color-text-ghost", - "--color-text-info", - "--color-text-danger", - "--color-text-success", - "--color-text-warning", - "--color-text-disabled", - "--color-border-primary", - "--color-border-secondary", - "--color-border-tertiary", - "--color-border-inverse", - "--color-border-ghost", - "--color-border-info", - "--color-border-danger", - "--color-border-success", - "--color-border-warning", - "--color-border-disabled", - "--color-ring-primary", - "--color-ring-secondary", - "--color-ring-inverse", - "--color-ring-info", - "--color-ring-danger", - "--color-ring-success", - "--color-ring-warning", - "--font-sans", - "--font-mono", - "--font-weight-normal", - "--font-weight-medium", - "--font-weight-semibold", - "--font-weight-bold", - "--font-text-xs-size", - "--font-text-sm-size", - "--font-text-md-size", - "--font-text-lg-size", - "--font-heading-xs-size", - "--font-heading-sm-size", - "--font-heading-md-size", - "--font-heading-lg-size", - "--font-heading-xl-size", - "--font-heading-2xl-size", - "--font-heading-3xl-size", - "--font-text-xs-line-height", - "--font-text-sm-line-height", - "--font-text-md-line-height", - "--font-text-lg-line-height", - "--font-heading-xs-line-height", - "--font-heading-sm-line-height", - "--font-heading-md-line-height", - "--font-heading-lg-line-height", - "--font-heading-xl-line-height", - "--font-heading-2xl-line-height", - "--font-heading-3xl-line-height", - "--border-radius-xs", - "--border-radius-sm", - "--border-radius-md", - "--border-radius-lg", - "--border-radius-xl", - "--border-radius-full", - "--border-width-regular", - "--shadow-hairline", - "--shadow-sm", - "--shadow-md", - "--shadow-lg" - ] + ] + } }, "css": { "description": "CSS blocks that apps can inject.", @@ -881,8 +800,8 @@ "type": "object", "properties": { "height": { - "type": "number", - "description": "Fixed container height in pixels." + "description": "Fixed container height in pixels.", + "type": "number" } }, "required": ["height"], @@ -911,8 +830,8 @@ "type": "object", "properties": { "width": { - "type": "number", - "description": "Fixed container width in pixels." + "description": "Fixed container width in pixels.", + "type": "number" } }, "required": ["width"], @@ -986,28 +905,27 @@ "type": "object", "properties": { "top": { - "type": "number", - "description": "Top safe area inset in pixels." + "description": "Top safe area inset in pixels.", + "type": "number" }, "right": { - "type": "number", - "description": "Right safe area inset in pixels." + "description": "Right safe area inset in pixels.", + "type": "number" }, "bottom": { - "type": "number", - "description": "Bottom safe area inset in pixels." + "description": "Bottom safe area inset in pixels.", + "type": "number" }, "left": { - "type": "number", - "description": "Left safe area inset in pixels." + "description": "Left safe area inset in pixels.", + "type": "number" } }, "required": ["top", "right", "bottom", "left"], "additionalProperties": false } }, - "additionalProperties": {}, - "description": "Partial context update containing only changed fields." + "additionalProperties": {} } }, "required": ["method", "params"], @@ -1035,6 +953,7 @@ ] }, "tool": { + "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -1059,10 +978,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -1160,8 +1075,7 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false, - "description": "Tool definition including name, inputSchema, etc." + "additionalProperties": false } }, "required": ["tool"], @@ -1188,6 +1102,7 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -1497,96 +1412,17 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] }, "additionalProperties": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." - }, - "required": [ - "--color-background-primary", - "--color-background-secondary", - "--color-background-tertiary", - "--color-background-inverse", - "--color-background-ghost", - "--color-background-info", - "--color-background-danger", - "--color-background-success", - "--color-background-warning", - "--color-background-disabled", - "--color-text-primary", - "--color-text-secondary", - "--color-text-tertiary", - "--color-text-inverse", - "--color-text-ghost", - "--color-text-info", - "--color-text-danger", - "--color-text-success", - "--color-text-warning", - "--color-text-disabled", - "--color-border-primary", - "--color-border-secondary", - "--color-border-tertiary", - "--color-border-inverse", - "--color-border-ghost", - "--color-border-info", - "--color-border-danger", - "--color-border-success", - "--color-border-warning", - "--color-border-disabled", - "--color-ring-primary", - "--color-ring-secondary", - "--color-ring-inverse", - "--color-ring-info", - "--color-ring-danger", - "--color-ring-success", - "--color-ring-warning", - "--font-sans", - "--font-mono", - "--font-weight-normal", - "--font-weight-medium", - "--font-weight-semibold", - "--font-weight-bold", - "--font-text-xs-size", - "--font-text-sm-size", - "--font-text-md-size", - "--font-text-lg-size", - "--font-heading-xs-size", - "--font-heading-sm-size", - "--font-heading-md-size", - "--font-heading-lg-size", - "--font-heading-xl-size", - "--font-heading-2xl-size", - "--font-heading-3xl-size", - "--font-text-xs-line-height", - "--font-text-sm-line-height", - "--font-text-md-line-height", - "--font-text-lg-line-height", - "--font-heading-xs-line-height", - "--font-heading-sm-line-height", - "--font-heading-md-line-height", - "--font-heading-lg-line-height", - "--font-heading-xl-line-height", - "--font-heading-2xl-line-height", - "--font-heading-3xl-line-height", - "--border-radius-xs", - "--border-radius-sm", - "--border-radius-md", - "--border-radius-lg", - "--border-radius-xl", - "--border-radius-full", - "--border-width-regular", - "--shadow-hairline", - "--shadow-sm", - "--shadow-md", - "--shadow-lg" - ] + ] + } }, "css": { "description": "CSS blocks that apps can inject.", @@ -1635,8 +1471,8 @@ "type": "object", "properties": { "height": { - "type": "number", - "description": "Fixed container height in pixels." + "description": "Fixed container height in pixels.", + "type": "number" } }, "required": ["height"], @@ -1665,8 +1501,8 @@ "type": "object", "properties": { "width": { - "type": "number", - "description": "Fixed container width in pixels." + "description": "Fixed container width in pixels.", + "type": "number" } }, "required": ["width"], @@ -1740,20 +1576,20 @@ "type": "object", "properties": { "top": { - "type": "number", - "description": "Top safe area inset in pixels." + "description": "Top safe area inset in pixels.", + "type": "number" }, "right": { - "type": "number", - "description": "Right safe area inset in pixels." + "description": "Right safe area inset in pixels.", + "type": "number" }, "bottom": { - "type": "number", - "description": "Bottom safe area inset in pixels." + "description": "Bottom safe area inset in pixels.", + "type": "number" }, "left": { - "type": "number", - "description": "Left safe area inset in pixels." + "description": "Left safe area inset in pixels.", + "type": "number" } }, "required": ["top", "right", "bottom", "left"], @@ -1781,6 +1617,7 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -2090,96 +1927,17 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] }, "additionalProperties": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." - }, - "required": [ - "--color-background-primary", - "--color-background-secondary", - "--color-background-tertiary", - "--color-background-inverse", - "--color-background-ghost", - "--color-background-info", - "--color-background-danger", - "--color-background-success", - "--color-background-warning", - "--color-background-disabled", - "--color-text-primary", - "--color-text-secondary", - "--color-text-tertiary", - "--color-text-inverse", - "--color-text-ghost", - "--color-text-info", - "--color-text-danger", - "--color-text-success", - "--color-text-warning", - "--color-text-disabled", - "--color-border-primary", - "--color-border-secondary", - "--color-border-tertiary", - "--color-border-inverse", - "--color-border-ghost", - "--color-border-info", - "--color-border-danger", - "--color-border-success", - "--color-border-warning", - "--color-border-disabled", - "--color-ring-primary", - "--color-ring-secondary", - "--color-ring-inverse", - "--color-ring-info", - "--color-ring-danger", - "--color-ring-success", - "--color-ring-warning", - "--font-sans", - "--font-mono", - "--font-weight-normal", - "--font-weight-medium", - "--font-weight-semibold", - "--font-weight-bold", - "--font-text-xs-size", - "--font-text-sm-size", - "--font-text-md-size", - "--font-text-lg-size", - "--font-heading-xs-size", - "--font-heading-sm-size", - "--font-heading-md-size", - "--font-heading-lg-size", - "--font-heading-xl-size", - "--font-heading-2xl-size", - "--font-heading-3xl-size", - "--font-text-xs-line-height", - "--font-text-sm-line-height", - "--font-text-md-line-height", - "--font-text-lg-line-height", - "--font-heading-xs-line-height", - "--font-heading-sm-line-height", - "--font-heading-md-line-height", - "--font-heading-lg-line-height", - "--font-heading-xl-line-height", - "--font-heading-2xl-line-height", - "--font-heading-3xl-line-height", - "--border-radius-xs", - "--border-radius-sm", - "--border-radius-md", - "--border-radius-lg", - "--border-radius-xl", - "--border-radius-full", - "--border-width-regular", - "--shadow-hairline", - "--shadow-sm", - "--shadow-md", - "--shadow-lg" - ] + ] + } }, "css": { "description": "CSS blocks that apps can inject.", @@ -2207,6 +1965,7 @@ "type": "object", "properties": { "appInfo": { + "description": "App identification (name and version).", "type": "object", "properties": { "name": { @@ -2231,10 +1990,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -2246,16 +2001,13 @@ }, "websiteUrl": { "type": "string" - }, - "description": { - "type": "string" } }, "required": ["name", "version"], - "additionalProperties": false, - "description": "App identification (name and version)." + "additionalProperties": false }, "appCapabilities": { + "description": "Features and capabilities this app provides.", "type": "object", "properties": { "experimental": { @@ -2276,12 +2028,11 @@ "additionalProperties": false } }, - "additionalProperties": false, - "description": "Features and capabilities this app provides." + "additionalProperties": false }, "protocolVersion": { - "type": "string", - "description": "Protocol version this app supports." + "description": "Protocol version this app supports.", + "type": "string" } }, "required": ["appInfo", "appCapabilities", "protocolVersion"], @@ -2296,10 +2047,11 @@ "type": "object", "properties": { "protocolVersion": { - "type": "string", - "description": "Negotiated protocol version string (e.g., \"2025-11-21\")." + "description": "Negotiated protocol version string (e.g., \"2025-11-21\").", + "type": "string" }, "hostInfo": { + "description": "Host application identification and version.", "type": "object", "properties": { "name": { @@ -2324,10 +2076,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -2339,16 +2087,13 @@ }, "websiteUrl": { "type": "string" - }, - "description": { - "type": "string" } }, "required": ["name", "version"], - "additionalProperties": false, - "description": "Host application identification and version." + "additionalProperties": false }, "hostCapabilities": { + "description": "Features and capabilities provided by the host.", "type": "object", "properties": { "experimental": { @@ -2551,10 +2296,10 @@ "additionalProperties": false } }, - "additionalProperties": false, - "description": "Features and capabilities provided by the host." + "additionalProperties": false }, "hostContext": { + "description": "Rich context about the host environment.", "type": "object", "properties": { "toolInfo": { @@ -2575,6 +2320,7 @@ ] }, "tool": { + "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -2599,10 +2345,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -2700,8 +2442,7 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false, - "description": "Tool definition including name, inputSchema, etc." + "additionalProperties": false } }, "required": ["tool"], @@ -2728,6 +2469,7 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -3037,96 +2779,17 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] }, "additionalProperties": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." - }, - "required": [ - "--color-background-primary", - "--color-background-secondary", - "--color-background-tertiary", - "--color-background-inverse", - "--color-background-ghost", - "--color-background-info", - "--color-background-danger", - "--color-background-success", - "--color-background-warning", - "--color-background-disabled", - "--color-text-primary", - "--color-text-secondary", - "--color-text-tertiary", - "--color-text-inverse", - "--color-text-ghost", - "--color-text-info", - "--color-text-danger", - "--color-text-success", - "--color-text-warning", - "--color-text-disabled", - "--color-border-primary", - "--color-border-secondary", - "--color-border-tertiary", - "--color-border-inverse", - "--color-border-ghost", - "--color-border-info", - "--color-border-danger", - "--color-border-success", - "--color-border-warning", - "--color-border-disabled", - "--color-ring-primary", - "--color-ring-secondary", - "--color-ring-inverse", - "--color-ring-info", - "--color-ring-danger", - "--color-ring-success", - "--color-ring-warning", - "--font-sans", - "--font-mono", - "--font-weight-normal", - "--font-weight-medium", - "--font-weight-semibold", - "--font-weight-bold", - "--font-text-xs-size", - "--font-text-sm-size", - "--font-text-md-size", - "--font-text-lg-size", - "--font-heading-xs-size", - "--font-heading-sm-size", - "--font-heading-md-size", - "--font-heading-lg-size", - "--font-heading-xl-size", - "--font-heading-2xl-size", - "--font-heading-3xl-size", - "--font-text-xs-line-height", - "--font-text-sm-line-height", - "--font-text-md-line-height", - "--font-text-lg-line-height", - "--font-heading-xs-line-height", - "--font-heading-sm-line-height", - "--font-heading-md-line-height", - "--font-heading-lg-line-height", - "--font-heading-xl-line-height", - "--font-heading-2xl-line-height", - "--font-heading-3xl-line-height", - "--border-radius-xs", - "--border-radius-sm", - "--border-radius-md", - "--border-radius-lg", - "--border-radius-xl", - "--border-radius-full", - "--border-width-regular", - "--shadow-hairline", - "--shadow-sm", - "--shadow-md", - "--shadow-lg" - ] + ] + } }, "css": { "description": "CSS blocks that apps can inject.", @@ -3175,8 +2838,8 @@ "type": "object", "properties": { "height": { - "type": "number", - "description": "Fixed container height in pixels." + "description": "Fixed container height in pixels.", + "type": "number" } }, "required": ["height"], @@ -3205,8 +2868,8 @@ "type": "object", "properties": { "width": { - "type": "number", - "description": "Fixed container width in pixels." + "description": "Fixed container width in pixels.", + "type": "number" } }, "required": ["width"], @@ -3280,28 +2943,27 @@ "type": "object", "properties": { "top": { - "type": "number", - "description": "Top safe area inset in pixels." + "description": "Top safe area inset in pixels.", + "type": "number" }, "right": { - "type": "number", - "description": "Right safe area inset in pixels." + "description": "Right safe area inset in pixels.", + "type": "number" }, "bottom": { - "type": "number", - "description": "Bottom safe area inset in pixels." + "description": "Bottom safe area inset in pixels.", + "type": "number" }, "left": { - "type": "number", - "description": "Left safe area inset in pixels." + "description": "Left safe area inset in pixels.", + "type": "number" } }, "required": ["top", "right", "bottom", "left"], "additionalProperties": false } }, - "additionalProperties": {}, - "description": "Rich context about the host environment." + "additionalProperties": {} } }, "required": [ @@ -3341,11 +3003,12 @@ "type": "object", "properties": { "role": { + "description": "Message role, currently only \"user\" is supported.", "type": "string", - "const": "user", - "description": "Message role, currently only \"user\" is supported." + "const": "user" }, "content": { + "description": "Message content blocks (text, image, etc.).", "type": "array", "items": { "anyOf": [ @@ -3512,10 +3175,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -3659,8 +3318,7 @@ "additionalProperties": false } ] - }, - "description": "Message content blocks (text, image, etc.)." + } } }, "required": ["role", "content"], @@ -3693,8 +3351,8 @@ "type": "object", "properties": { "url": { - "type": "string", - "description": "URL to open in the host's browser" + "description": "URL to open in the host's browser", + "type": "string" } }, "required": ["url"], @@ -3727,6 +3385,7 @@ "type": "object", "properties": { "mode": { + "description": "The display mode being requested.", "anyOf": [ { "type": "string", @@ -3740,8 +3399,7 @@ "type": "string", "const": "pip" } - ], - "description": "The display mode being requested." + ] } }, "required": ["mode"], @@ -3756,6 +3414,7 @@ "type": "object", "properties": { "mode": { + "description": "The display mode that was actually set. May differ from requested if not supported.", "anyOf": [ { "type": "string", @@ -3769,8 +3428,7 @@ "type": "string", "const": "pip" } - ], - "description": "The display mode that was actually set. May differ from requested if not supported." + ] } }, "required": ["mode"], @@ -3977,8 +3635,8 @@ "type": "object", "properties": { "html": { - "type": "string", - "description": "HTML content to load into the inner iframe." + "description": "HTML content to load into the inner iframe.", + "type": "string" }, "sandbox": { "description": "Optional override for the inner iframe's sandbox attribute.", @@ -4086,6 +3744,7 @@ }, "McpUiStyleVariableKey": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "CSS variable keys available to MCP apps for theming.", "anyOf": [ { "type": "string", @@ -4395,13 +4054,14 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "CSS variable keys available to MCP apps for theming." + ] }, "McpUiStyles": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "type": "object", "propertyNames": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -4711,97 +4371,17 @@ "type": "string", "const": "--shadow-lg" } - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] }, "additionalProperties": { + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." - }, - "required": [ - "--color-background-primary", - "--color-background-secondary", - "--color-background-tertiary", - "--color-background-inverse", - "--color-background-ghost", - "--color-background-info", - "--color-background-danger", - "--color-background-success", - "--color-background-warning", - "--color-background-disabled", - "--color-text-primary", - "--color-text-secondary", - "--color-text-tertiary", - "--color-text-inverse", - "--color-text-ghost", - "--color-text-info", - "--color-text-danger", - "--color-text-success", - "--color-text-warning", - "--color-text-disabled", - "--color-border-primary", - "--color-border-secondary", - "--color-border-tertiary", - "--color-border-inverse", - "--color-border-ghost", - "--color-border-info", - "--color-border-danger", - "--color-border-success", - "--color-border-warning", - "--color-border-disabled", - "--color-ring-primary", - "--color-ring-secondary", - "--color-ring-inverse", - "--color-ring-info", - "--color-ring-danger", - "--color-ring-success", - "--color-ring-warning", - "--font-sans", - "--font-mono", - "--font-weight-normal", - "--font-weight-medium", - "--font-weight-semibold", - "--font-weight-bold", - "--font-text-xs-size", - "--font-text-sm-size", - "--font-text-md-size", - "--font-text-lg-size", - "--font-heading-xs-size", - "--font-heading-sm-size", - "--font-heading-md-size", - "--font-heading-lg-size", - "--font-heading-xl-size", - "--font-heading-2xl-size", - "--font-heading-3xl-size", - "--font-text-xs-line-height", - "--font-text-sm-line-height", - "--font-text-md-line-height", - "--font-text-lg-line-height", - "--font-heading-xs-line-height", - "--font-heading-sm-line-height", - "--font-heading-md-line-height", - "--font-heading-lg-line-height", - "--font-heading-xl-line-height", - "--font-heading-2xl-line-height", - "--font-heading-3xl-line-height", - "--border-radius-xs", - "--border-radius-sm", - "--border-radius-md", - "--border-radius-lg", - "--border-radius-xl", - "--border-radius-full", - "--border-width-regular", - "--shadow-hairline", - "--shadow-sm", - "--shadow-md", - "--shadow-lg" - ], - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + ] + } }, "McpUiSupportedContentBlockModalities": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -4848,6 +4428,7 @@ }, "McpUiTheme": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Color theme preference for the host environment.", "anyOf": [ { "type": "string", @@ -4857,8 +4438,7 @@ "type": "string", "const": "dark" } - ], - "description": "Color theme preference for the host environment." + ] }, "McpUiToolCancelledNotification": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -4949,6 +4529,7 @@ "description": "Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only", "type": "array", "items": { + "description": "Tool visibility scope - who can access the tool.", "anyOf": [ { "type": "string", @@ -4958,8 +4539,7 @@ "type": "string", "const": "app" } - ], - "description": "Tool visibility scope - who can access the tool." + ] } } }, @@ -4974,23 +4554,12 @@ "const": "ui/notifications/tool-result" }, "params": { + "description": "Standard MCP tool execution result.", "type": "object", "properties": { "_meta": { "type": "object", "properties": { - "progressToken": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - ] - }, "io.modelcontextprotocol/related-task": { "type": "object", "properties": { @@ -4999,7 +4568,7 @@ } }, "required": ["taskId"], - "additionalProperties": false + "additionalProperties": {} } }, "additionalProperties": {} @@ -5172,10 +4741,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], @@ -5333,8 +4898,7 @@ } }, "required": ["content"], - "additionalProperties": {}, - "description": "Standard MCP tool execution result." + "additionalProperties": {} } }, "required": ["method", "params"], @@ -5342,6 +4906,7 @@ }, "McpUiToolVisibility": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Tool visibility scope - who can access the tool.", "anyOf": [ { "type": "string", @@ -5351,8 +4916,7 @@ "type": "string", "const": "app" } - ], - "description": "Tool visibility scope - who can access the tool." + ] }, "McpUiUpdateModelContextRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -5533,10 +5097,6 @@ "items": { "type": "string" } - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] } }, "required": ["src"], From 74ba0c62bea7f00db60abaa6181d59f59562515f Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Mon, 12 Jan 2026 22:16:39 +0000 Subject: [PATCH 4/4] regen --- package-lock.json | 6 +- src/generated/schema.json | 658 +++++++++++++++++++++++++++++++------- 2 files changed, 552 insertions(+), 112 deletions(-) diff --git a/package-lock.json b/package-lock.json index f70f840f..b2f58d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6994,9 +6994,9 @@ } }, "node_modules/svelte": { - "version": "5.46.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.46.1.tgz", - "integrity": "sha512-ynjfCHD3nP2el70kN5Pmg37sSi0EjOm9FgHYQdC4giWG/hzO3AatzXXJJgP305uIhGQxSufJLuYWtkY8uK/8RA==", + "version": "5.46.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.46.3.tgz", + "integrity": "sha512-Y5juST3x+/ySty5tYJCVWa6Corkxpt25bUZQHqOceg9xfMUtDsFx6rCsG6cYf1cA6vzDi66HIvaki0byZZX95A==", "license": "MIT", "peer": true, "dependencies": { diff --git a/src/generated/schema.json b/src/generated/schema.json index a3e72eb8..1d87d9c8 100644 --- a/src/generated/schema.json +++ b/src/generated/schema.json @@ -30,7 +30,6 @@ }, "McpUiDisplayMode": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Display mode for UI presentation.", "anyOf": [ { "type": "string", @@ -44,7 +43,8 @@ "type": "string", "const": "pip" } - ] + ], + "description": "Display mode for UI presentation." }, "McpUiHostCapabilities": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -261,7 +261,6 @@ "const": "ui/notifications/host-context-changed" }, "params": { - "description": "Partial context update containing only changed fields.", "type": "object", "properties": { "toolInfo": { @@ -282,7 +281,6 @@ ] }, "tool": { - "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -307,6 +305,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -404,7 +406,8 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false + "additionalProperties": false, + "description": "Tool definition including name, inputSchema, etc." } }, "required": ["tool"], @@ -431,7 +434,6 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -741,17 +743,96 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "additionalProperties": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ] - } + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + }, + "required": [ + "--color-background-primary", + "--color-background-secondary", + "--color-background-tertiary", + "--color-background-inverse", + "--color-background-ghost", + "--color-background-info", + "--color-background-danger", + "--color-background-success", + "--color-background-warning", + "--color-background-disabled", + "--color-text-primary", + "--color-text-secondary", + "--color-text-tertiary", + "--color-text-inverse", + "--color-text-ghost", + "--color-text-info", + "--color-text-danger", + "--color-text-success", + "--color-text-warning", + "--color-text-disabled", + "--color-border-primary", + "--color-border-secondary", + "--color-border-tertiary", + "--color-border-inverse", + "--color-border-ghost", + "--color-border-info", + "--color-border-danger", + "--color-border-success", + "--color-border-warning", + "--color-border-disabled", + "--color-ring-primary", + "--color-ring-secondary", + "--color-ring-inverse", + "--color-ring-info", + "--color-ring-danger", + "--color-ring-success", + "--color-ring-warning", + "--font-sans", + "--font-mono", + "--font-weight-normal", + "--font-weight-medium", + "--font-weight-semibold", + "--font-weight-bold", + "--font-text-xs-size", + "--font-text-sm-size", + "--font-text-md-size", + "--font-text-lg-size", + "--font-heading-xs-size", + "--font-heading-sm-size", + "--font-heading-md-size", + "--font-heading-lg-size", + "--font-heading-xl-size", + "--font-heading-2xl-size", + "--font-heading-3xl-size", + "--font-text-xs-line-height", + "--font-text-sm-line-height", + "--font-text-md-line-height", + "--font-text-lg-line-height", + "--font-heading-xs-line-height", + "--font-heading-sm-line-height", + "--font-heading-md-line-height", + "--font-heading-lg-line-height", + "--font-heading-xl-line-height", + "--font-heading-2xl-line-height", + "--font-heading-3xl-line-height", + "--border-radius-xs", + "--border-radius-sm", + "--border-radius-md", + "--border-radius-lg", + "--border-radius-xl", + "--border-radius-full", + "--border-width-regular", + "--shadow-hairline", + "--shadow-sm", + "--shadow-md", + "--shadow-lg" + ] }, "css": { "description": "CSS blocks that apps can inject.", @@ -800,8 +881,8 @@ "type": "object", "properties": { "height": { - "description": "Fixed container height in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container height in pixels." } }, "required": ["height"], @@ -830,8 +911,8 @@ "type": "object", "properties": { "width": { - "description": "Fixed container width in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container width in pixels." } }, "required": ["width"], @@ -905,27 +986,28 @@ "type": "object", "properties": { "top": { - "description": "Top safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Top safe area inset in pixels." }, "right": { - "description": "Right safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Right safe area inset in pixels." }, "bottom": { - "description": "Bottom safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Bottom safe area inset in pixels." }, "left": { - "description": "Left safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Left safe area inset in pixels." } }, "required": ["top", "right", "bottom", "left"], "additionalProperties": false } }, - "additionalProperties": {} + "additionalProperties": {}, + "description": "Partial context update containing only changed fields." } }, "required": ["method", "params"], @@ -953,7 +1035,6 @@ ] }, "tool": { - "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -978,6 +1059,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -1075,7 +1160,8 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false + "additionalProperties": false, + "description": "Tool definition including name, inputSchema, etc." } }, "required": ["tool"], @@ -1102,7 +1188,6 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -1412,17 +1497,96 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "additionalProperties": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ] - } + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + }, + "required": [ + "--color-background-primary", + "--color-background-secondary", + "--color-background-tertiary", + "--color-background-inverse", + "--color-background-ghost", + "--color-background-info", + "--color-background-danger", + "--color-background-success", + "--color-background-warning", + "--color-background-disabled", + "--color-text-primary", + "--color-text-secondary", + "--color-text-tertiary", + "--color-text-inverse", + "--color-text-ghost", + "--color-text-info", + "--color-text-danger", + "--color-text-success", + "--color-text-warning", + "--color-text-disabled", + "--color-border-primary", + "--color-border-secondary", + "--color-border-tertiary", + "--color-border-inverse", + "--color-border-ghost", + "--color-border-info", + "--color-border-danger", + "--color-border-success", + "--color-border-warning", + "--color-border-disabled", + "--color-ring-primary", + "--color-ring-secondary", + "--color-ring-inverse", + "--color-ring-info", + "--color-ring-danger", + "--color-ring-success", + "--color-ring-warning", + "--font-sans", + "--font-mono", + "--font-weight-normal", + "--font-weight-medium", + "--font-weight-semibold", + "--font-weight-bold", + "--font-text-xs-size", + "--font-text-sm-size", + "--font-text-md-size", + "--font-text-lg-size", + "--font-heading-xs-size", + "--font-heading-sm-size", + "--font-heading-md-size", + "--font-heading-lg-size", + "--font-heading-xl-size", + "--font-heading-2xl-size", + "--font-heading-3xl-size", + "--font-text-xs-line-height", + "--font-text-sm-line-height", + "--font-text-md-line-height", + "--font-text-lg-line-height", + "--font-heading-xs-line-height", + "--font-heading-sm-line-height", + "--font-heading-md-line-height", + "--font-heading-lg-line-height", + "--font-heading-xl-line-height", + "--font-heading-2xl-line-height", + "--font-heading-3xl-line-height", + "--border-radius-xs", + "--border-radius-sm", + "--border-radius-md", + "--border-radius-lg", + "--border-radius-xl", + "--border-radius-full", + "--border-width-regular", + "--shadow-hairline", + "--shadow-sm", + "--shadow-md", + "--shadow-lg" + ] }, "css": { "description": "CSS blocks that apps can inject.", @@ -1471,8 +1635,8 @@ "type": "object", "properties": { "height": { - "description": "Fixed container height in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container height in pixels." } }, "required": ["height"], @@ -1501,8 +1665,8 @@ "type": "object", "properties": { "width": { - "description": "Fixed container width in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container width in pixels." } }, "required": ["width"], @@ -1576,20 +1740,20 @@ "type": "object", "properties": { "top": { - "description": "Top safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Top safe area inset in pixels." }, "right": { - "description": "Right safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Right safe area inset in pixels." }, "bottom": { - "description": "Bottom safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Bottom safe area inset in pixels." }, "left": { - "description": "Left safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Left safe area inset in pixels." } }, "required": ["top", "right", "bottom", "left"], @@ -1617,7 +1781,6 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -1927,17 +2090,96 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "additionalProperties": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ] - } + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + }, + "required": [ + "--color-background-primary", + "--color-background-secondary", + "--color-background-tertiary", + "--color-background-inverse", + "--color-background-ghost", + "--color-background-info", + "--color-background-danger", + "--color-background-success", + "--color-background-warning", + "--color-background-disabled", + "--color-text-primary", + "--color-text-secondary", + "--color-text-tertiary", + "--color-text-inverse", + "--color-text-ghost", + "--color-text-info", + "--color-text-danger", + "--color-text-success", + "--color-text-warning", + "--color-text-disabled", + "--color-border-primary", + "--color-border-secondary", + "--color-border-tertiary", + "--color-border-inverse", + "--color-border-ghost", + "--color-border-info", + "--color-border-danger", + "--color-border-success", + "--color-border-warning", + "--color-border-disabled", + "--color-ring-primary", + "--color-ring-secondary", + "--color-ring-inverse", + "--color-ring-info", + "--color-ring-danger", + "--color-ring-success", + "--color-ring-warning", + "--font-sans", + "--font-mono", + "--font-weight-normal", + "--font-weight-medium", + "--font-weight-semibold", + "--font-weight-bold", + "--font-text-xs-size", + "--font-text-sm-size", + "--font-text-md-size", + "--font-text-lg-size", + "--font-heading-xs-size", + "--font-heading-sm-size", + "--font-heading-md-size", + "--font-heading-lg-size", + "--font-heading-xl-size", + "--font-heading-2xl-size", + "--font-heading-3xl-size", + "--font-text-xs-line-height", + "--font-text-sm-line-height", + "--font-text-md-line-height", + "--font-text-lg-line-height", + "--font-heading-xs-line-height", + "--font-heading-sm-line-height", + "--font-heading-md-line-height", + "--font-heading-lg-line-height", + "--font-heading-xl-line-height", + "--font-heading-2xl-line-height", + "--font-heading-3xl-line-height", + "--border-radius-xs", + "--border-radius-sm", + "--border-radius-md", + "--border-radius-lg", + "--border-radius-xl", + "--border-radius-full", + "--border-width-regular", + "--shadow-hairline", + "--shadow-sm", + "--shadow-md", + "--shadow-lg" + ] }, "css": { "description": "CSS blocks that apps can inject.", @@ -1965,7 +2207,6 @@ "type": "object", "properties": { "appInfo": { - "description": "App identification (name and version).", "type": "object", "properties": { "name": { @@ -1990,6 +2231,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -2001,13 +2246,16 @@ }, "websiteUrl": { "type": "string" + }, + "description": { + "type": "string" } }, "required": ["name", "version"], - "additionalProperties": false + "additionalProperties": false, + "description": "App identification (name and version)." }, "appCapabilities": { - "description": "Features and capabilities this app provides.", "type": "object", "properties": { "experimental": { @@ -2028,11 +2276,12 @@ "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Features and capabilities this app provides." }, "protocolVersion": { - "description": "Protocol version this app supports.", - "type": "string" + "type": "string", + "description": "Protocol version this app supports." } }, "required": ["appInfo", "appCapabilities", "protocolVersion"], @@ -2047,11 +2296,10 @@ "type": "object", "properties": { "protocolVersion": { - "description": "Negotiated protocol version string (e.g., \"2025-11-21\").", - "type": "string" + "type": "string", + "description": "Negotiated protocol version string (e.g., \"2025-11-21\")." }, "hostInfo": { - "description": "Host application identification and version.", "type": "object", "properties": { "name": { @@ -2076,6 +2324,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -2087,13 +2339,16 @@ }, "websiteUrl": { "type": "string" + }, + "description": { + "type": "string" } }, "required": ["name", "version"], - "additionalProperties": false + "additionalProperties": false, + "description": "Host application identification and version." }, "hostCapabilities": { - "description": "Features and capabilities provided by the host.", "type": "object", "properties": { "experimental": { @@ -2296,10 +2551,10 @@ "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Features and capabilities provided by the host." }, "hostContext": { - "description": "Rich context about the host environment.", "type": "object", "properties": { "toolInfo": { @@ -2320,7 +2575,6 @@ ] }, "tool": { - "description": "Tool definition including name, inputSchema, etc.", "type": "object", "properties": { "name": { @@ -2345,6 +2599,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -2442,7 +2700,8 @@ } }, "required": ["name", "inputSchema"], - "additionalProperties": false + "additionalProperties": false, + "description": "Tool definition including name, inputSchema, etc." } }, "required": ["tool"], @@ -2469,7 +2728,6 @@ "description": "CSS variables for theming the app.", "type": "object", "propertyNames": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -2779,17 +3037,96 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "additionalProperties": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ] - } + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + }, + "required": [ + "--color-background-primary", + "--color-background-secondary", + "--color-background-tertiary", + "--color-background-inverse", + "--color-background-ghost", + "--color-background-info", + "--color-background-danger", + "--color-background-success", + "--color-background-warning", + "--color-background-disabled", + "--color-text-primary", + "--color-text-secondary", + "--color-text-tertiary", + "--color-text-inverse", + "--color-text-ghost", + "--color-text-info", + "--color-text-danger", + "--color-text-success", + "--color-text-warning", + "--color-text-disabled", + "--color-border-primary", + "--color-border-secondary", + "--color-border-tertiary", + "--color-border-inverse", + "--color-border-ghost", + "--color-border-info", + "--color-border-danger", + "--color-border-success", + "--color-border-warning", + "--color-border-disabled", + "--color-ring-primary", + "--color-ring-secondary", + "--color-ring-inverse", + "--color-ring-info", + "--color-ring-danger", + "--color-ring-success", + "--color-ring-warning", + "--font-sans", + "--font-mono", + "--font-weight-normal", + "--font-weight-medium", + "--font-weight-semibold", + "--font-weight-bold", + "--font-text-xs-size", + "--font-text-sm-size", + "--font-text-md-size", + "--font-text-lg-size", + "--font-heading-xs-size", + "--font-heading-sm-size", + "--font-heading-md-size", + "--font-heading-lg-size", + "--font-heading-xl-size", + "--font-heading-2xl-size", + "--font-heading-3xl-size", + "--font-text-xs-line-height", + "--font-text-sm-line-height", + "--font-text-md-line-height", + "--font-text-lg-line-height", + "--font-heading-xs-line-height", + "--font-heading-sm-line-height", + "--font-heading-md-line-height", + "--font-heading-lg-line-height", + "--font-heading-xl-line-height", + "--font-heading-2xl-line-height", + "--font-heading-3xl-line-height", + "--border-radius-xs", + "--border-radius-sm", + "--border-radius-md", + "--border-radius-lg", + "--border-radius-xl", + "--border-radius-full", + "--border-width-regular", + "--shadow-hairline", + "--shadow-sm", + "--shadow-md", + "--shadow-lg" + ] }, "css": { "description": "CSS blocks that apps can inject.", @@ -2838,8 +3175,8 @@ "type": "object", "properties": { "height": { - "description": "Fixed container height in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container height in pixels." } }, "required": ["height"], @@ -2868,8 +3205,8 @@ "type": "object", "properties": { "width": { - "description": "Fixed container width in pixels.", - "type": "number" + "type": "number", + "description": "Fixed container width in pixels." } }, "required": ["width"], @@ -2943,27 +3280,28 @@ "type": "object", "properties": { "top": { - "description": "Top safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Top safe area inset in pixels." }, "right": { - "description": "Right safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Right safe area inset in pixels." }, "bottom": { - "description": "Bottom safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Bottom safe area inset in pixels." }, "left": { - "description": "Left safe area inset in pixels.", - "type": "number" + "type": "number", + "description": "Left safe area inset in pixels." } }, "required": ["top", "right", "bottom", "left"], "additionalProperties": false } }, - "additionalProperties": {} + "additionalProperties": {}, + "description": "Rich context about the host environment." } }, "required": [ @@ -3003,12 +3341,11 @@ "type": "object", "properties": { "role": { - "description": "Message role, currently only \"user\" is supported.", "type": "string", - "const": "user" + "const": "user", + "description": "Message role, currently only \"user\" is supported." }, "content": { - "description": "Message content blocks (text, image, etc.).", "type": "array", "items": { "anyOf": [ @@ -3175,6 +3512,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -3318,7 +3659,8 @@ "additionalProperties": false } ] - } + }, + "description": "Message content blocks (text, image, etc.)." } }, "required": ["role", "content"], @@ -3351,8 +3693,8 @@ "type": "object", "properties": { "url": { - "description": "URL to open in the host's browser", - "type": "string" + "type": "string", + "description": "URL to open in the host's browser" } }, "required": ["url"], @@ -3385,7 +3727,6 @@ "type": "object", "properties": { "mode": { - "description": "The display mode being requested.", "anyOf": [ { "type": "string", @@ -3399,7 +3740,8 @@ "type": "string", "const": "pip" } - ] + ], + "description": "The display mode being requested." } }, "required": ["mode"], @@ -3414,7 +3756,6 @@ "type": "object", "properties": { "mode": { - "description": "The display mode that was actually set. May differ from requested if not supported.", "anyOf": [ { "type": "string", @@ -3428,7 +3769,8 @@ "type": "string", "const": "pip" } - ] + ], + "description": "The display mode that was actually set. May differ from requested if not supported." } }, "required": ["mode"], @@ -3635,8 +3977,8 @@ "type": "object", "properties": { "html": { - "description": "HTML content to load into the inner iframe.", - "type": "string" + "type": "string", + "description": "HTML content to load into the inner iframe." }, "sandbox": { "description": "Optional override for the inner iframe's sandbox attribute.", @@ -3744,7 +4086,6 @@ }, "McpUiStyleVariableKey": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "CSS variable keys available to MCP apps for theming.", "anyOf": [ { "type": "string", @@ -4054,14 +4395,13 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "CSS variable keys available to MCP apps for theming." }, "McpUiStyles": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "type": "object", "propertyNames": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string", @@ -4371,17 +4711,97 @@ "type": "string", "const": "--shadow-lg" } - ] + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "additionalProperties": { - "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.", "anyOf": [ { "type": "string" }, {} - ] - } + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." + }, + "required": [ + "--color-background-primary", + "--color-background-secondary", + "--color-background-tertiary", + "--color-background-inverse", + "--color-background-ghost", + "--color-background-info", + "--color-background-danger", + "--color-background-success", + "--color-background-warning", + "--color-background-disabled", + "--color-text-primary", + "--color-text-secondary", + "--color-text-tertiary", + "--color-text-inverse", + "--color-text-ghost", + "--color-text-info", + "--color-text-danger", + "--color-text-success", + "--color-text-warning", + "--color-text-disabled", + "--color-border-primary", + "--color-border-secondary", + "--color-border-tertiary", + "--color-border-inverse", + "--color-border-ghost", + "--color-border-info", + "--color-border-danger", + "--color-border-success", + "--color-border-warning", + "--color-border-disabled", + "--color-ring-primary", + "--color-ring-secondary", + "--color-ring-inverse", + "--color-ring-info", + "--color-ring-danger", + "--color-ring-success", + "--color-ring-warning", + "--font-sans", + "--font-mono", + "--font-weight-normal", + "--font-weight-medium", + "--font-weight-semibold", + "--font-weight-bold", + "--font-text-xs-size", + "--font-text-sm-size", + "--font-text-md-size", + "--font-text-lg-size", + "--font-heading-xs-size", + "--font-heading-sm-size", + "--font-heading-md-size", + "--font-heading-lg-size", + "--font-heading-xl-size", + "--font-heading-2xl-size", + "--font-heading-3xl-size", + "--font-text-xs-line-height", + "--font-text-sm-line-height", + "--font-text-md-line-height", + "--font-text-lg-line-height", + "--font-heading-xs-line-height", + "--font-heading-sm-line-height", + "--font-heading-md-line-height", + "--font-heading-lg-line-height", + "--font-heading-xl-line-height", + "--font-heading-2xl-line-height", + "--font-heading-3xl-line-height", + "--border-radius-xs", + "--border-radius-sm", + "--border-radius-md", + "--border-radius-lg", + "--border-radius-xl", + "--border-radius-full", + "--border-width-regular", + "--shadow-hairline", + "--shadow-sm", + "--shadow-md", + "--shadow-lg" + ], + "description": "Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record` rather than `Partial>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation." }, "McpUiSupportedContentBlockModalities": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -4428,7 +4848,6 @@ }, "McpUiTheme": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Color theme preference for the host environment.", "anyOf": [ { "type": "string", @@ -4438,7 +4857,8 @@ "type": "string", "const": "dark" } - ] + ], + "description": "Color theme preference for the host environment." }, "McpUiToolCancelledNotification": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -4529,7 +4949,6 @@ "description": "Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only", "type": "array", "items": { - "description": "Tool visibility scope - who can access the tool.", "anyOf": [ { "type": "string", @@ -4539,7 +4958,8 @@ "type": "string", "const": "app" } - ] + ], + "description": "Tool visibility scope - who can access the tool." } } }, @@ -4554,12 +4974,23 @@ "const": "ui/notifications/tool-result" }, "params": { - "description": "Standard MCP tool execution result.", "type": "object", "properties": { "_meta": { "type": "object", "properties": { + "progressToken": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + ] + }, "io.modelcontextprotocol/related-task": { "type": "object", "properties": { @@ -4568,7 +4999,7 @@ } }, "required": ["taskId"], - "additionalProperties": {} + "additionalProperties": false } }, "additionalProperties": {} @@ -4741,6 +5172,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"], @@ -4898,7 +5333,8 @@ } }, "required": ["content"], - "additionalProperties": {} + "additionalProperties": {}, + "description": "Standard MCP tool execution result." } }, "required": ["method", "params"], @@ -4906,7 +5342,6 @@ }, "McpUiToolVisibility": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Tool visibility scope - who can access the tool.", "anyOf": [ { "type": "string", @@ -4916,7 +5351,8 @@ "type": "string", "const": "app" } - ] + ], + "description": "Tool visibility scope - who can access the tool." }, "McpUiUpdateModelContextRequest": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -5097,6 +5533,10 @@ "items": { "type": "string" } + }, + "theme": { + "type": "string", + "enum": ["light", "dark"] } }, "required": ["src"],