Show an interface
show_interfaceDraw an interactive UI from a SayShape spec for charts, tables, dashboards, forms, calculators, or trackers; returns a publishable web page when chat cannot show it and flags skipped lines to fix.
Instructions
Draws an interactive interface from a spec, with the SayShape engine: suited to charts, tables, dashboards, stat cards, forms, calculators and trackers. This chat app can't show it in the conversation, so when the spec has nothing to fix the result gives a small web page that draws it, to publish or save for the person. Specs can't run code or choose colors. The result lists lines the parser skipped, with the docs for those elements, so you can fix them.
HOW SAYSHAPE FITS TOGETHER (one element per line, children indented 2 spaces, no code)
state holds values: state budget=500 picked="All". derive works a value out from others and updates by itself: derive left={budget - spent}
{…} reads them in text and props. Controls write them with bind=; on= actions change them (set, inc, add) or tell the app (emit)
each repeats elements for every item of a list; if= shows or hides an element
data from the app may hold numbers and dates as text: read them with num('$36,626') and date('9 Jan 2026') (YYYY-MM-DD; month(), quarter(), year() of it), and tidy names with tidy() so they group. Totals and charts already read numbers written as text
CAPABILITIES (building blocks; name several together)
lists: lists and records in state: repeat with each; filter, sort, group and total them
calculations: values worked out from other values with derive, updating as people change inputs
forms: fields, choices and buttons people fill in: required=, error= and disabled= checks, and emit: to send it
actions: what presses do: change state (set, inc, add, remove), go between screens, notify, or tell the app (emit)
layout: cards, rows, grids, columns, accordions, carousels, scroll areas, dialogs and slide decks
content: text, images, badges, avatars, callouts, icons and code
data: numbers and records: charts, tables, stats, meters, details, compare, boards, trees, flows, schedules
navigation: several screens, tabs, breadcrumbs and pages
feedback: progress, loading placeholders and empty states
full: the whole guide, when nothing narrower fits
ELEMENTS (ask for one by name for its props and example)
layout: column, row, overlap, grid, card, list, list-item, accordion, divider, spacer, each, timeline, step, carousel, scroll, deck, slide
content: text, image, code, badge, avatar, callout, icon, tile
data: stat, rating, chart, chart-line, chart-rule, chart-band, chart-note, meter, table, table-column, compare, compare-row, details, detail, schedule, board, tree, flow
input: button, link, check, switch, radio, select, date-picker, stepper, slider, input, segmented, menu, menu-item
navigation: screen, tabs, tab, breadcrumb, pagination
feedback: progress, skeleton, empty, dialog
For anything else, call sayshape_docs once with every capability and element the screen needs, such as topics: ["forms", "calculations"], elements: ["slider"], then write it. Other topics: expressions, rules, examples, chat.
IN A CHAT: under 600px. Title, filters, a few KPIs in grid min=140, one main chart; no nested cards. Caption estimates.
This chat app shows interfaces as a page outside the chat, so emit: can't reach you: don't use it. Buttons can still change the page (set:, inc:, go:); ask the person to reply in the chat for anything you need back.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spec": "<spec>"
},
"name": "show_interface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The SayShape spec: plain lines, no Markdown fences. | |
| title | No | A short name for the interface, e.g. 'Paris 2024 medal table'. | |
| colors | No | Brand colors as hex, most important first, such as ["#e4572e", "#2e86ab"]: send them only when the person, or the instructions you were given, named colors to use. |