Skip to main content
Glama

Show an interface

show_interface
Read-only

Draw 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

NameRequiredDescriptionDefault
specYesThe SayShape spec: plain lines, no Markdown fences.
titleNoA short name for the interface, e.g. 'Paris 2024 medal table'.
colorsNoBrand 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.2

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond readOnlyHint/openWorldHint: the result is rendered outside the conversation as a saveable/publishable page, specs cannot execute code or pick colors (except via the colors param), and the response echoes skipped lines with documentation so the agent can repair them. Those are exactly the non-obvious behaviors an agent needs when a render fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and key constraints, but the body is a reference manual: capability list plus roughly sixty element names that duplicate what sayshape_docs is explicitly designated to supply. Dense and well organized, yet the element catalog is largely tangent to the calling decision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool whose spec is a whole DSL, the definition supplies the grammar skeleton (state, derive, bind, each, if, num/date/tidy), capability routing, and the chat-specific layout recipe. With no output schema, it also explains what comes back (a page plus skipped-line diagnostics), leaving nothing essential unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real constraint meaning — the spec is plain lines with 2-space indentation, no code, no colors, and colors should only be sent when the person or prior instructions named them. It stops short of per-parameter syntax help for title/colors beyond that constraint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and artifact ('Draws an interactive interface from a spec') plus the engine and the artifact's form ('a small web page'), and distinguishes itself from the sibling docs tool by naming sayshape_docs as the lookup path. An agent can tell what this produces without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing rules: call sayshape_docs once with the needed capabilities/elements before writing, then write; 'full' topic when nothing narrower fits; and concrete chat-app constraints (under 600px, no nested cards, one main chart). It also names a hard exclusion — emit: cannot reach the chat, so ask the person to reply instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools