Clarify documentation

This commit is contained in:
martinalong 2025-12-17 21:36:35 -08:00
commit 06c0e08a17
No known key found for this signature in database
2 changed files with 46 additions and 38 deletions

View file

@ -633,19 +633,19 @@
"type": "object",
"properties": {
"width": {
"description": "Current viewport width in pixels.",
"description": "Viewport width in pixels (if fixed). Only pass width or maxWidth, not both.",
"type": "number"
},
"height": {
"description": "Current viewport height in pixels.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available height in pixels (if constrained).",
"description": "Viewport height in pixels (if fixed). Only pass height or maxHeight, not both.",
"type": "number"
},
"maxWidth": {
"description": "Maximum available width in pixels (if constrained).",
"description": "Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both.",
"type": "number"
}
},
@ -1258,19 +1258,19 @@
"type": "object",
"properties": {
"width": {
"description": "Current viewport width in pixels.",
"description": "Viewport width in pixels (if fixed). Only pass width or maxWidth, not both.",
"type": "number"
},
"height": {
"description": "Current viewport height in pixels.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available height in pixels (if constrained).",
"description": "Viewport height in pixels (if fixed). Only pass height or maxHeight, not both.",
"type": "number"
},
"maxWidth": {
"description": "Maximum available width in pixels (if constrained).",
"description": "Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both.",
"type": "number"
}
},
@ -2416,19 +2416,19 @@
"type": "object",
"properties": {
"width": {
"description": "Current viewport width in pixels.",
"description": "Viewport width in pixels (if fixed). Only pass width or maxWidth, not both.",
"type": "number"
},
"height": {
"description": "Current viewport height in pixels.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available height in pixels (if constrained).",
"description": "Viewport height in pixels (if fixed). Only pass height or maxHeight, not both.",
"type": "number"
},
"maxWidth": {
"description": "Maximum available width in pixels (if constrained).",
"description": "Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.",
"type": "number"
},
"maxHeight": {
"description": "Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both.",
"type": "number"
}
},

View file

@ -565,26 +565,34 @@ export const McpUiHostContextSchema = z.looseObject({
/** @description Current and maximum dimensions available to the UI. */
viewport: z
.object({
/** @description Current viewport width in pixels. */
/** @description Viewport width in pixels (if fixed). Only pass width or maxWidth, not both. */
width: z
.number()
.optional()
.describe("Current viewport width in pixels."),
/** @description Current viewport height in pixels. */
.describe(
"Viewport width in pixels (if fixed). Only pass width or maxWidth, not both.",
),
/** @description Viewport height in pixels (if fixed). Only pass height or maxHeight, not both. */
height: z
.number()
.optional()
.describe("Current viewport height in pixels."),
/** @description Maximum available height in pixels (if constrained). */
maxHeight: z
.number()
.optional()
.describe("Maximum available height in pixels (if constrained)."),
/** @description Maximum available width in pixels (if constrained). */
.describe(
"Viewport height in pixels (if fixed). Only pass height or maxHeight, not both.",
),
/** @description Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.*/
maxWidth: z
.number()
.optional()
.describe("Maximum available width in pixels (if constrained)."),
.describe(
"Maximum available viewport width in pixels (if constrained). Only pass width or maxWidth, not both.",
),
/** @description Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both. */
maxHeight: z
.number()
.optional()
.describe(
"Maximum available viewport height in pixels (if constrained). Only pass height or maxHeight, not both.",
),
})
.optional()
.describe("Current and maximum dimensions available to the UI."),