71 lines
3.1 KiB
JSON
71 lines
3.1 KiB
JSON
[
|
|
{
|
|
"name": "render_ui",
|
|
"description": "Render an interactive UI resource in the chat. Use the `uri` field to specify the resource type, and pass all parameters in the `data` object.\n\nSupported URIs:\n- `ui://mcp-ui/html` — Render custom HTML/CSS/JS. data: {html_content, title?, width?, height?}\n- `ui://mcp-ui/url` — Embed an external URL in an iframe. data: {url, title?, width?, height?}\n- `ui://mcp-ui/ask-user` — Present questions with selectable options. data: {questions: [{question, options, multi_select?}], title?}",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"uri": {
|
|
"type": "string",
|
|
"enum": ["ui://mcp-ui/html", "ui://mcp-ui/url", "ui://mcp-ui/ask-user"],
|
|
"description": "Resource URI that determines the rendering mode"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Parameters for the specified URI. Structure depends on uri:\n- html: {html_content: string, title?: string, width?: string, height?: string}\n- url: {url: string, title?: string, width?: string, height?: string}\n- ask-user: {questions: [{question: string, options: string[], multi_select?: boolean}], title?: string}",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "A descriptive title for the UI widget"
|
|
},
|
|
"html_content": {
|
|
"type": "string",
|
|
"description": "[uri=html] Complete HTML content to render. Can include inline CSS and JavaScript."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "[uri=url] External URL to embed in an iframe."
|
|
},
|
|
"width": {
|
|
"type": "string",
|
|
"description": "[uri=html|url] CSS width. Default: '100%'",
|
|
"default": "100%"
|
|
},
|
|
"height": {
|
|
"type": "string",
|
|
"description": "[uri=html|url] CSS height. Default: 'auto'",
|
|
"default": "auto"
|
|
},
|
|
"questions": {
|
|
"type": "array",
|
|
"description": "[uri=ask-user] Array of questions to ask the user.",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question": {
|
|
"type": "string",
|
|
"description": "The question to ask the user"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": { "type": "string" },
|
|
"description": "REQUIRED array with at least 2 options."
|
|
},
|
|
"multi_select": {
|
|
"type": "boolean",
|
|
"description": "If true, the user can select multiple options. Default: false.",
|
|
"default": false
|
|
}
|
|
},
|
|
"required": ["question", "options"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["uri", "data"]
|
|
}
|
|
}
|
|
]
|