65 lines
2.4 KiB
JSON
65 lines
2.4 KiB
JSON
[
|
|
{
|
|
"name": "render_ui",
|
|
"description": "Render an interactive UI resource in the chat. Use the `uri` field to specify the resource type. Supported URIs:\n- `ui://mcp-ui/html` — Render custom HTML/CSS/JS (provide html_content)\n- `ui://mcp-ui/url` — Embed an external URL in an iframe (provide url)\n- `ui://mcp-ui/ask-user` — Present questions with selectable options to the user (provide questions)",
|
|
"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"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "A descriptive title for the UI widget"
|
|
},
|
|
"html_content": {
|
|
"type": "string",
|
|
"description": "[uri=ui://mcp-ui/html] Complete HTML content to render. Can include inline CSS and JavaScript."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "[uri=ui://mcp-ui/url] External URL to embed in an iframe."
|
|
},
|
|
"width": {
|
|
"type": "string",
|
|
"description": "[uri=ui://mcp-ui/html|url] CSS width for the iframe. Default: '100%'",
|
|
"default": "100%"
|
|
},
|
|
"height": {
|
|
"type": "string",
|
|
"description": "[uri=ui://mcp-ui/html|url] CSS height for the iframe. Default: 'auto'",
|
|
"default": "auto"
|
|
},
|
|
"questions": {
|
|
"type": "array",
|
|
"description": "[uri=ui://mcp-ui/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", "title"]
|
|
}
|
|
}
|
|
]
|