Formal shapes for the manifest and the values MCP tools return. See Manifest & icons for narrative.
WidgetManifest
interface WidgetManifest {
id: string;
name: string;
refreshMs: number;
htmlHash: string; // SHA-256 (hex) of the HTML
version: number;
publishedAt?: number; // Unix seconds
icon?: WidgetIcon;
builtInSlug?: string; // set if installed from a shipped template
builtInVersion?: number;
}
WidgetIcon
interface WidgetIcon {
kind: "sfSymbol" | "emoji" | "png";
// sfSymbol: symbol name · emoji: the character ·
// png: base64 PNG on input, rewritten to the bytes' SHA-256 once stored
value: string;
}
MCP tool results
// pair_status
interface PairStatus { paired: boolean; connected: boolean; deviceName?: string; }
// publish_widget
interface PublishWidgetResult { id: string; }
// list_widgets
interface ListWidgetsResult { widgets: WidgetManifest[]; activeWidgetId?: string; }
// list_versions
interface WidgetVersion { version: number; htmlHash: string; updatedAt: number; note?: string; }
interface ListVersionsResult { versions: WidgetVersion[]; }
// get_data_endpoint
interface DataEndpoint { url: string; token: string; }
Tool arguments at a glance
| Tool | Required | Optional |
|---|---|---|
publish_widget | name, html | refreshMs, icon |
update_widget | id, html | icon |
set_widget_icon | id, icon | — |
set_active_widget | id | — |
delete_widget | id | — |
list_versions | id | — |
revert_widget | id, version | — |
push_data | id, data | — |
get_data_endpoint | id | — |
register_action (debug) | widgetId, actionId, command | description, argKeys |