Skip to content

Commit aed8cbe

Browse files
committed
Clarify documentation
1 parent 010ff33 commit aed8cbe

File tree

4 files changed

+46
-38
lines changed

4 files changed

+46
-38
lines changed

specification/draft/apps.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,14 @@ interface HostContext {
458458
availableDisplayModes?: string[];
459459
/** Current and maximum dimensions available to the UI. */
460460
viewport?: {
461-
/** Current viewport width in pixels. */
461+
/** Viewport width (if fixed). Only pass width or maxWidth, not both. */
462462
width?: number;
463-
/** Current viewport height in pixels. */
463+
/** Viewport height (if fixed). Only pass height or maxHeight, not both. */
464464
height?: number;
465-
/** Maximum available height in pixels (if constrained). */
466-
maxHeight?: number;
467-
/** Maximum available width in pixels (if constrained). */
465+
/** Maximum available viewport width in pixels (if constrained). */
468466
maxWidth?: number;
467+
/** Maximum available viewport height in pixels (if constrained). */
468+
maxHeight?: number;
469469
};
470470
/** User's language/region preference (BCP 47, e.g., "en-US") */
471471
locale?: string;

src/generated/schema.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generated/schema.ts

Lines changed: 18 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/spec.types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ export interface McpUiHostContext {
315315
availableDisplayModes?: string[];
316316
/** @description Current and maximum dimensions available to the UI. */
317317
viewport?: {
318-
/** @description Current viewport width in pixels. */
318+
/** @description Viewport width in pixels (if fixed). Only pass width or maxWidth, not both. */
319319
width?: number;
320-
/** @description Current viewport height in pixels. */
320+
/** @description Viewport height in pixels (if fixed). Only pass height or maxHeight, not both. */
321321
height?: number;
322-
/** @description Maximum available height in pixels (if constrained). */
323-
maxHeight?: number;
324-
/** @description Maximum available width in pixels (if constrained). */
322+
/** @description Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.*/
325323
maxWidth?: number;
324+
/** @description Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both. */
325+
maxHeight?: number;
326326
};
327327
/** @description User's language and region preference in BCP 47 format. */
328328
locale?: string;

0 commit comments

Comments
 (0)