Reference

Manifest & result types

The widget manifest, icon, and MCP tool result shapes.

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;
}

WidgetVersion

One entry in a widget’s bounded, forward-only code history. list_versions returns these newest-first; set_widget_version re-applies one as a new current version.

interface WidgetVersion {
  version: number;
  htmlHash: string;        // SHA-256 (hex) of that snapshot's HTML
  updatedAt: number;       // Unix seconds
  note?: string;
}
interface ListVersionsResult { versions: WidgetVersion[]; }

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 → ListVersionsResult (see WidgetVersion above)

// get_data_endpoint
interface DataEndpoint { url: string; token: string; }

Tool arguments at a glance

ToolRequiredOptional
publish_widgetname, htmlrefreshMs, icon
update_widgetid, htmlicon
set_widget_iconid, icon
set_active_widgetid
delete_widgetid
list_versionsid
set_widget_versionid, version
push_dataid, data
get_data_endpointid
register_action (debug)widgetId, actionId, commanddescription, argKeys