tesserae-mcp
v0.19.0MCP bridge for Tesserae: build e-ink canvas dashboards with an AI agent.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_widgets
List every widget that can be placed on a canvas (with its fragments), the vendored code-element libraries (Chart.js, canvas-gauges, dayjs, qrcode, marked, chroma, SVG.js, Phosphor), and descriptors for the icon set and the appearance options. Search icon names with list_icons(). The whole catalog runs to ~95k characters, past the tool-result cap, so by default each widget is summarised to {key, name, desc, fragments} and the library block is returned in full. "desc" is the first sentence of the widget's description only. That is enough…
| Parameter | Type | Description |
|---|---|---|
fields | ||
full | boolean | |
q | string | |
section | string |
add_font
Cache a webfont on the server so pages and code elements can use it by name with no network at render time. family + weights (default [400, 700]) + styles (default ["normal"]) fetches it from Google Fonts once; family + url stores one face from a direct .woff2 / .ttf / .otf URL (repeat per weight). Only the latin subset is kept unless "subsets" says otherwise, which keeps a CJK family like Shippori Mincho small. Returns {id, name, weights, styles, bytes, usage}. Afterwards `font-family: 'Shippori Mincho', serif` in a code element's CSS re…
| Parameter | Type | Description |
|---|---|---|
family * | string | |
style | string | |
styles | ||
subsets | ||
url | string | |
weight | integer | |
weights |
list_fonts
The cached webfonts (id, name, weights, styles, subsets, bytes). Bundled families are in list_widgets(section="appearance").fonts, where cached ones also appear with "source": "cached".
delete_font
Remove a cached webfont by id or family name. Pages that named it fall back to the default font; code elements to their CSS fallback stack.
| Parameter | Type | Description |
|---|---|---|
font * | string |
list_icons
Search the vendored Phosphor icon set (all six weights) by case-insensitive substring, so you pick a real slug instead of guessing. The query is normalised to slug form first (a "ph-" prefix is stripped, underscores become dashes), so q="ph-heart" and q="calendar_heart" both match. Use a returned slug as an icon element's "icon" value, or in code-element markup as ph-<slug> (weight via ph / ph-bold / ph-thin / ph-light / ph-fill / ph-duotone; regular weight needs BOTH classes, class="ph ph-heart" -- ph-heart alone renders nothing). An ico…
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
q | string |
list_services
List SERVICE data sources (kind "service") -- non-placeable plugins that expose a whole external service's API (e.g. Home Assistant, a weather API, a generic REST endpoint) as data for a code element. They don't appear in list_widgets (they can't be placed), but you use one exactly like a widget source: its "key" is a valid "source"/"sources[].key" for a code or data element. Workflow: list_services() -> get_widget_options(key) to see its scope options -> probe_widget_data(key, {}) with EMPTY options first (a service returns a self-descri…
get_widget_options
Get the configurable options for one widget, so you can fill an element's "options" correctly (e.g. a weather widget's location). Also returns the widget's full "desc" (list_widgets carries only its first sentence). Each option carries a "format" hint for its type. Big choice lists (HA entity pickers) are omitted by default (the option shows "choices_count" + a "choices_endpoint"); pass include_choices=True to inline them, or call get_widget_choices() to page.
| Parameter | Type | Description |
|---|---|---|
widget * | string | |
include_choices | boolean |
get_widget_choices
Page through the choice rows for one of a widget's options (kept out of get_widget_options so a picker with hundreds of entries doesn't bloat the schema). "q" filters by case-insensitive substring on value/label.
| Parameter | Type | Description |
|---|---|---|
option * | string | |
widget * | string | |
limit | integer | |
offset | integer | |
q | string |
probe_widget_data
Return a widget's data as JSON to pick "field" paths before binding a data primitive. Returns {data, data_source, reason, fields}: "data_source" is "live" (real fetch), "sample" (demo fallback because nothing was configured), or "error" (fetch failed) so you never mistake a placeholder for a real result; "fields" lists the bindable dot-paths with sample values (a wrong key simply isn't in the list; an empty payload has fields with null values). Long lists in "data" are truncated to "max_items" entries, each trimmed list carrying a siblin…
| Parameter | Type | Description |
|---|---|---|
widget * | string | |
full | boolean | |
max_items | integer | |
options |
list_devices
List registered display devices with panel dims AND colour capability: "color_mode" (e.g. "6-colour (Spectra 6)"), "colors" (the renderable palette as hex), "gamut", "orientation", and a "mono" flag. Match a canvas's w/h to the target panel. The panel dithers the full-colour render down to these inks, so DESIGN IN FULL COLOUR -- the palette guides fine detail (thin text/icons), it doesn't cap the whole layout. Honour "mono" for grayscale-only panels. "touch": true appears on panels with a touch digitizer (e.g. the Seeed reTerminal E1003)…
list_pages
List existing canvas (freeform) dashboards.
create_canvas_page
Create a new, empty canvas dashboard and return its id. Size it to your target panel (see list_devices), then call bind_devices(page_id, [device_ids]) RIGHT AWAY so the artboard and Send/schedule target the real hardware from the start. Then build the layout (add an empty code element + append_code, or set_canvas).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
h | integer | |
w | integer |
delete_canvas_page
Delete a canvas dashboard by id (e.g. a throwaway QA page). Returns {ok: true} on success, or 404 if it isn't a canvas page. If a lineup uses the page it is NOT deleted: you get HTTP 409 {error: "page_in_lineups", lineups: [...names]}. Repeat with remove_from_lineups=true to delete it and take it out of those lineups (a lineup left with no other dashboard is deleted too).
| Parameter | Type | Description |
|---|---|---|
page_id * | string | |
remove_from_lineups | boolean |
get_canvas
Get the full canvas document (size, appearance, and every element) for a page, plus "rev" / "updated_at" / "updated_by". Keep the "rev" and pass it as base_rev on your next write to be warned (HTTP 409) if the page drifted.
| Parameter | Type | Description |
|---|---|---|
page_id * | string |
set_canvas
Replace a canvas dashboard's document. Returns a compact {ok,id,rev,elements} ack (not the full document), or an error with field-level "details" (HTTP 422) if the document is invalid, so you can correct it and retry. Pass base_rev (the rev from get_canvas) to be warned with HTTP 409 if the page changed under you. For a one-field change prefer update_element / patch_canvas. After setting, call render_preview() (or render_report()) to check the result. A canvas document is JSON: { "w": int, "h": int, # artboard size in px (match the tar…
| Parameter | Type | Description |
|---|---|---|
canvas * | object | |
page_id * | string | |
base_rev | string |
set_canvas_background
Generate an AI background image (fal.ai) from "prompt" and set it as the canvas' full-bleed background; the data elements composite crisply ON TOP, so the data never passes through the image model. Sized to the canvas' aspect. Optional "model" (default flux/schnell), "style" (e.g. watercolor, bauhaus, risograph), and "fit" (cover|contain|stretch). The fal.ai API key lives on the "AI image" widget (the fal-image widget) -- that's the primary place it's configured, so if this returns a 400 about a missing key, tell the user to paste their f…
| Parameter | Type | Description |
|---|---|---|
page_id * | string | |
prompt * | string | |
fit | string | |
model | string | |
style | string |
add_element
Append ONE element to a canvas and save (each call is a separate save, so an open editor updates live as you build). "element" is a single element object (same shapes as set_canvas's "els"); returns {ok,id,rev,elements,element_id}. Prefer this when building incrementally; use set_canvas to replace the whole layout at once. The element's type goes in "kind", NOT "type": {"kind": "code", "x": 0, "y": 0, "w": 480, "h": 800, ...}. Unknown fields are refused with a 422 naming them rather than silently ignored, so "type" fails outright. A can…
| Parameter | Type | Description |
|---|---|---|
element * | object | |
page_id * | string | |
base_rev | string |
add_elements_bulk
Append MANY elements to a canvas in one save (max 500). Built for a large primitive board that won't fit in a single set_canvas body: chunk the elements across a few calls instead of inlining a 20k+ document. All-or-nothing: if any element is invalid (unknown field / schema error) nothing is appended and the offending index is named, so a bad chunk never half-lands. Returns the ack plus "element_ids" (in order) and "appended" (the count).
| Parameter | Type | Description |
|---|---|---|
elements * | array | |
page_id * | string | |
base_rev | string |
update_element
Change ONE element in place without re-sending the whole document. "patch" is a partial element ({field: value, ...}) merged over the existing one (a provided "options"/"parts" replaces wholesale). The cheap edit path for a big canvas: change a precision, a colour, a location, one box. Returns the ack.
| Parameter | Type | Description |
|---|---|---|
element_id * | string | |
page_id * | string | |
patch * | object | |
base_rev | string |
append_code
Append "text" to a code element's "field" ("html" | "css" | "js") and save. Each call is a separate save, which pushes a live update to an editor open on the page, so you can STREAM a code element in (chunk by chunk / line by line) and watch it build up, instead of posting the whole blob at once. Typical flow: add_element an empty code element (with its sources), then append_code repeatedly for html, then css, then js. Returns the ack plus the field's new "length". Don't thread base_rev while streaming (the rev changes every append).
| Parameter | Type | Description |
|---|---|---|
element_id * | string | |
field * | string | |
page_id * | string | |
text * | string |
delete_element
Remove ONE element from a canvas by id. Returns the compact ack.
| Parameter | Type | Description |
|---|---|---|
element_id * | string | |
page_id * | string | |
base_rev | string |
patch_canvas
Change document-level fields (any of name, w, h, theme, style, font, bg, bg_image, bg_fit, sleep_interval_s) without touching the elements. "sleep_interval_s" is how often a panel showing this dashboard wakes to fetch a new frame, in seconds (1..604800), or null to leave the device's own interval in charge; the server clamps it to what the device kind accepts. Use update_element / set_canvas for elements. Returns the ack.
| Parameter | Type | Description |
|---|---|---|
page_id * | string | |
patch * | object | |
base_rev | string |
arrange
Compute "count" aligned child boxes inside "box" ({x,y,w,h}) for a "grid" / "row" / "column" layout, so you place cells by intent instead of hand-computing pixels. "gap" is the space between cells, "pad" the inset from the box edge, "cols" forces a grid column count (default ~sqrt). Returns {boxes:[{x,y,w,h}, ...]}; spread them across your elements' geometry (bake them in as normal elements — they stay individually editable).
| Parameter | Type | Description |
|---|---|---|
box * | object | |
count * | integer | |
cols | integer | |
gap | integer | |
layout | string | |
pad | integer |
measure_text
Measure how wide/tall text renders in a widget font, so a box fits its content (prevents clipping). "items" is a list of {text, font?, size?, weight?, max_width?}. Returns {items:[{text,width,height,fits}]} where "fits" is whether the text is within max_width. Font names come from list_widgets(section="appearance").fonts.
| Parameter | Type | Description |
|---|---|---|
items * | array |
describe_actions
The authoritative touch-action vocabulary for canvas elements, so you don't have to reverse-engineer it: the element fields (on_tap / on_swipe / on_slide / actions), the string grammar (refresh / rotate_next / rotate_prev / step:<n> / page:<id> / webhook:<url>), the Home Assistant object form and every input variation that normalises to it, the slider {value} placeholder, the provenance rule (webhook/HA fire only from config, not raw markup), and how to verify wiring. Element-level actions are NOT part of get_widget_options (that's cell data).
render_report
Read back what a canvas actually rendered, as JSON (a companion to render_preview's image). Per element: the resolved box, the text that rendered, overflow/clip flags (overflow_x when content is wider than its box), "data_source" (live | sample | error | static), and computed colours; plus the board's resolved background / theme. Also "tap_regions" (every touch region that rendered: box + resolved on_tap/on_swipe/on_slide action), "tap_dangling" (code element @name refs with no matching entry), and "tap_invalid" (regions whose action woul…
| Parameter | Type | Description |
|---|---|---|
page_id * | string | |
debug | boolean | |
fields | string | |
fresh | boolean | |
view | string |
render_preview
Render the canvas to a PNG at its authored size and return the image, so you can visually check the layout and iterate. This is your feedback loop: place → render_preview → adjust → set_canvas → render_preview again. For a machine-readable check (values, overflow, colours), use render_report(). fresh=True re-fetches widget data (bypasses the last-good fallback and widget caches) -- use it while debugging so a stale cached result can't mislead you.
| Parameter | Type | Description |
|---|---|---|
page_id * | string | |
fresh | boolean |
push_to_device
Render the canvas ONCE and fan it out to the given devices (ids from list_devices), each fitted/quantised to its own panel by the server. device_ids is required and may list many panels -- pushing is always explicit. This is a one-off; use bind_devices to remember the target set for scheduling. Returns {sent: [...], errors: [...]}.
| Parameter | Type | Description |
|---|---|---|
device_ids * | array | |
page_id * | string |
bind_devices
Persistently bind a canvas to a set of devices (replaces the set; [] unbinds). Call this EARLY -- right after create_canvas_page -- not just before a push: it SAVES the target set on the page so the artboard, a later schedule / rotation, and the visual editor's Send all hit the same panels. Unlike push_to_device (a one-off fan-out), it doesn't render. Ids not matching a registered device (list_devices) are dropped and returned under "unknown". Returns {bound, unknown}.
| Parameter | Type | Description |
|---|---|---|
device_ids * | array | |
page_id * | string |
list_rotations
List rotations: ordered page cycles that advance on a wall-clock anchor (and via prev/next buttons). Each has steps [{page_id, dwell_minutes}] and device_ids.
create_rotation
Create or replace a rotation. 'rotation' is a full object: {id, name, device_ids, steps:[{page_id, dwell_minutes}], anchor? ("HH:MM"), days_of_week?}. Bind the step pages to the devices first (bind_devices). Returns {ok, id}, or 422 with "details" on a bad shape.
| Parameter | Type | Description |
|---|---|---|
rotation * | object |
delete_rotation
Delete a rotation by id.
| Parameter | Type | Description |
|---|---|---|
rotation_id * | string |
list_schedules
List schedules: time-driven pushes of a page to its devices (interval or daily, with day-of-week + time-window filters).
create_schedule
Create or replace a schedule. 'schedule' is a full object: {id, name, page_id, type ("interval"|"daily"), interval_minutes? or fires_at?, days_of_week?, priority?}. Returns {ok, id}, or 422 with "details" on a bad shape. 'name' is REQUIRED alongside 'id' and must be non-empty; omitting it 422s. A daily schedule's 'fires_at' is a FULL datetime, not "HH:MM": only the time-of-day is used, so the date is a placeholder and "2000-01-01T06:00:00" is the conventional way to write 6am.
| Parameter | Type | Description |
|---|---|---|
schedule * | object |
delete_schedule
Delete a schedule by id.
| Parameter | Type | Description |
|---|---|---|
schedule_id * | string |
list_decks
List decks: groups of pages kept pre-rendered per device so a button press or touch that moves between them is instant. Each page links to others by a button name or a touch zone.
suggest_decks
Suggest decks derived from the page:<id> tap/swipe links you set on page elements (on_tap / on_swipe): connected clusters of linked pages, each a ready-to-create Deck with its graph + touch zones filled in. Use this after wiring inter-page navigation to offer the user a deck.
create_deck
Create or replace a deck. 'deck' is a full object: {id, name, device_ids, pages:[{page_id, refresh_interval_minutes? (per-page override of the deck default; 0 = warm only on first visit), links: [{target_page_id, and exactly one of button:"left"/"right"/... OR zone:{x,y,w,h in 0..1}}]}], entry_page_id?, refresh_interval_minutes?}. Link targets must be pages in the deck. Prefer suggest_decks() to build one from existing page links. Omitting links entirely is also fine: the server derives the graph from the pages' page:<id> tap/swipe links,…
| Parameter | Type | Description |
|---|---|---|
deck * | object |
delete_deck
Delete a deck by id.
| Parameter | Type | Description |
|---|---|---|
deck_id * | string |