show_device_dashboard
Display an interactive dashboard to view and control WeMo smart home devices with toggle, on, and off functionality directly within your AI assistant interface.
Instructions
Show an interactive WeMo device dashboard inline in the host.
Returns rich HTML showing all cached devices as cards with Toggle / On / Off buttons. Supported in Claude Desktop, VS Code, ChatGPT, Goose and any other MCP Apps-compatible host (spec: SEP-1865).
Text-only fallback: use list_devices instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/wemo_mcp_server/server.py:1663-1714 (handler)The show_device_dashboard tool implementation in server.py.
@mcp.tool() async def show_device_dashboard() -> list[UIResource]: # type: ignore[return] """Show an interactive WeMo device dashboard inline in the host. Returns rich HTML showing all cached devices as cards with Toggle / On / Off buttons. Supported in Claude Desktop, VS Code, ChatGPT, Goose and any other MCP Apps-compatible host (spec: SEP-1865). Text-only fallback: use list_devices instead. """ devices = _collect_unique_devices() if devices: card_parts: list[str] = [] for d in devices: nh = _h(d["name"]) nj = _js(d["name"]) card_parts.append( f'<div class="card">' f'<div class="name" title="{nh}">{nh}</div>' f'<div class="meta">{_h(d["host"])} · {_h(d["model"])}</div>' f'<div class="btn-row">' f"<button onclick=\"doOn('{nj}',this)\">On</button>" f"<button onclick=\"doOff('{nj}',this)\">Off</button>" f"<button onclick=\"doToggle('{nj}',this)\">Toggle</button>" f"</div></div>" ) count_badge = f'<span class="badge">{len(devices)}</span>' grid = '<div class="grid">' + "".join(card_parts) + "</div>" else: count_badge = "" grid = ( '<p class="empty">No devices cached.' " Ask your assistant to run scan_network first.</p>" ) html = ( '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8">' f"<style>{_DASHBOARD_CSS}</style></head><body>" f"<h2>WeMo Devices {count_badge}</h2>{grid}" '<div class="footer">wemo-mcp-server · MCP Apps</div>' f"<script>{_DASHBOARD_JS}</script></body></html>" ) resource = create_ui_resource( { "uri": "ui://wemo/device-dashboard", "content": {"type": "rawHtml", "htmlString": html}, "encoding": "text", } ) return [resource] # type: ignore[return-value]