Skip to main content

MCP tools

npx nodality mcp runs a Model Context Protocol server over stdio with six tools. Every report has the same shape, so an agent repairs from one kind of output.

ToolChecks or returns
list_opsThe vocabulary of N
get_schemaThe vocabulary of E, one type at a time
validate_nodesWhether a pair is valid, before it renders
previewThe pair rendered to HTML
check_pageWhat the rendered page actually does
parse_htmlA rendered page read back into E

list_ops​

Every raster op with its pipeline stage and its parameters (name, default, unit, whether changing it rebuilds the shader), plus the parameters every node inherits (target, by, side, ease …), the driver, easing and unit names, the transition presets a morph may name, and the elementTypes. It is assembled from the live registry, so it cannot drift from what the pipeline accepts.

get_schema​

One element type's parameters, on demand. Call it for the type you are about to write rather than carrying every type in context: that is the difference between paying for a schema once and paying for it in every request. Each entry is recovered from the source the components actually read, so it cannot describe a parameter the library does not have. Omit type for the whole schema.

Composites carry content in a slot – items for cards, nav, sideNav, table and ulist; children for row, form, stack and wrap.

validate_nodes​

Checks a node array – and, if you pass them, the elements and targets – and returns a report. It never throws: malformed input is a report. Near misses are checked against the op that was meant, so one call returns every error. See Validation.

preview​

Renders an (E, N) pair to a self-contained HTML file through the build-time prerenderer (jsdom; no browser is launched) and returns { path, bytes, note }. Invalid nodes return the validation report instead. Raster effects and transitions need a GPU and run only when the file is opened in a browser. Needs jsdom in your project.

check_page​

What the page actually does once it has real layout, at a phone and a desktop width: horizontal overflow, elements past the viewport, clipped content, images with no description, tap targets under 24 px, controls with no accessible name, skipped heading levels and text below the WCAG contrast minimum. Pass html, or path to a file preview wrote; for a prerendered site page, pass base so its fonts and assets load. It reports facts, never taste. Needs Playwright in your project.

parse_html​

Reads a rendered page back into an E array, so a page can be edited rather than regenerated. A page rendered with { annotate: true } comes back exactly. Without it, only what the tag settles is recovered (headings, paragraphs, links, images, lists); composites that render as a bare <div> are reported as unrecovered rather than guessed.