show_card
Display a draggable floating card with self-contained HTML, such as a diagram, animation, or interactive demo, directly on the current browser page.
Instructions
Show a floating card on the page containing HTML you write: a diagram, an animation, a worked example, a small interactive demo. The HTML must be self-contained (inline , , SVG or canvas); it runs isolated with no network access, so no external scripts, fonts, images or fetch (data: images are fine). Design it for the given size without scrolling, and support light and dark with prefers-color-scheme. The user can drag and close the card. A new card replaces the ones you showed before unless keep is true. The result says whether the content actually drew; if it reports an error or an empty body, fix the HTML rather than telling the user it is there.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tabId": "<tabId>",
"html": "<html>"
},
"name": "show_card"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Place the card beside this element; default is the bottom-right corner | |
| html | Yes | A complete HTML document, or body content | |
| keep | No | Leave your earlier cards on the page (default: replace them) | |
| tabId | Yes | Tab ID, from tabs_list or tab_create | |
| title | No | Shown in the card header | |
| width | No | Pixels, default 400 | |
| height | No | Pixels, default 300 |