maias
v0.5.1Validate, query, safely edit, and wireframe MAIAS app-IA documents: cascading renames, atomic edits.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
validate Validate a MAIAS document
JSON Schema validation plus semantic lint (dangling targets, orphans, registry membership, …) for a MAIAS file. Returns { valid, diagnostics[] } with line/col positions.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a .yaml or .json MAIAS document |
query Query a MAIAS document graph
Graph utilities over a MAIAS file: get one screen, list screens/flows, reachability analysis, orphan detection, "what links here" for a screen id, a text outline of the structure (tree — show this to the user after creating or restructuring a document), and a Mermaid flowchart (mermaid — renders in GitHub/Claude/Obsidian). tree and mermaid return plain text, not JSON; mermaid accepts an optional flow to scope the diagram.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the MAIAS document |
operation * | string | |
flow | string | mermaid: scope the diagram to one flow |
refs | boolean | tree: append each screen's outbound targets and states |
screen_id | string | Screen id — required for 'screen' and 'what_links_here' |
edit Safely edit a MAIAS document
Reference-safe edits: rename_screen cascades to flows, the navigation registry, and every target; add_screen registers the screen; remove_screen refuses to leave dangling references unless cascade is set. Writes the result back to the file (canonically formatted when format_output is true).
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the MAIAS document |
operation * | string | |
cascade | boolean | remove_screen: also remove inbound references |
flow | string | Flow to append the new screen to (add_screen) |
format_output | boolean | Write canonical form (default true) |
new_id | string | New id (rename_screen) |
registry | string | Registry list for add_screen (default secondary) |
screen | object | Screen object per the spec (add_screen) |
screen_id | string | Target screen id (rename_screen / remove_screen) |
edit_elements Safely edit a screen's elements
Batch edit of a screen's `elements` list (or a declared state's list): insert, update, remove, move. The batch is atomic — a failing op refuses the whole batch and the file is untouched. Ops apply sequentially, so each op's index addresses the list as left by the previous ops (0-based; insert at list length appends; move's `to` is the final index). `update.set` patches only the given keys — an explicit null deletes a key, `x_` fields not named survive. An op introducing a `target` that matches no screen is refused, as is editing a state the screen does not declare. Pass `expect` so a stale…
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the MAIAS document |
ops * | array | Operations, applied in order, all-or-nothing |
screen_id * | string | Screen whose elements are edited |
format_output | boolean | Write canonical form (default true) |
wireframe Render an HTML wireframe board
Deterministic mobile wireframes from a MAIAS file: one self-contained HTML file (inline CSS, no JS, no external URLs) with one phone frame per screen, flows as rows, and click-through anchors between frames. Pass out to write the file (recommended — returns a summary); without out the raw HTML is returned as text (large). Refuses documents with validation errors (dangling targets become dead links) unless force is set.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the MAIAS document |
accent | string | Hex accent colour (e.g. #0A84FF) replacing the default wireframe grey |
flow | string | Render only this flow |
force | boolean | Render despite validation errors |
out | string | Write the HTML here (e.g. <app>-wireframes.html); when absent the HTML is returned as text |
states | boolean | Also emit declared empty/loading/error variants as extra frames |