set_dashboard_theme
Set the server-side default dashboard theme to control first-visit appearance for new operators. Choose from built-in palettes or define a custom brand theme with 13 CSS color tokens.
Instructions
Set the server-side default dashboard theme (v2.2.1).
When to use: org-level theme defaults ('every new operator should land on dark'), or programmatically applying a brand palette via mode='custom'. Each individual operator's localStorage preference still beats this default for repeat visits, this only affects first-visit theming for newly-connecting clients.
Behavior: stores the chosen theme + optional custom_json in dashboard_prefs. Modes: 'catppuccin' (default Mocha palette), 'dark' (tool-neutral), 'light' (tool-neutral), 'custom' (requires custom_json with all 13 CSS color tokens). No WebSocket push, already-open dashboards adopt on full reload. Auth: dashboard-secret-equivalent capability (treated as an admin operation).
Returns: { success: true, theme, updated_at: ISO, note }.
Errors: AUTH_FAILED, INVALID_INPUT (custom mode missing required tokens), RATE_LIMITED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Theme mode. catppuccin is the default; dark/light are tool-neutral; custom requires custom_json. | |
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. | |
| custom_json | No | Required when mode='custom'. JSON object with all 13 CSS-token fields (bg, panel, panel-2, border, text, muted, accent, online, stale, offline, critical, high, normal, low). |