Arc
v0.15.2Author, validate, lay out, render, and diff architecture diagrams as code.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
arc_live_serve
Start a loopback push stream (SSE, WebSocket and RPC).
| Parameter | Type | Description |
|---|---|---|
stream * | string | |
port | integer |
arc_live_apply
Atomically apply a v1 command envelope to the local push stream.
| Parameter | Type | Description |
|---|---|---|
envelope |
arc_live_read
Read the current command stream state.
open_live_diagram
Open an idle architecture view in the Hudson Kit Arc studio. Open the returned liveUrl once; use begin_live_diagram_work before doing diagram work, update_live_diagram for full revisions, and finish_live_diagram_work when that work ends. Keep stable node IDs for continuous motion. Connection identity comes from MCP initialization; optional agent labels are caller-declared.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
agent | object | Optional display identity for this session; preserves the actual MCP client name, version, and connection ID |
baseUrl | string | Studio base URL (default: ARC_EDITOR_URL or http://localhost:5188) |
title | string | Human-readable title for the live architecture |
open_architecture_review
Open a saved architecture review with a baseline diagram and a concrete review question. The liveUrl is a read capability; keep the returned resumeToken private so a later MCP connection can resume after disconnect or restart. Revisions, findings, decisions, and open questions persist atomically in ARC_REVIEW_DIR. Use begin_live_diagram_work, update_live_diagram, and finish_live_diagram_work for declared work; use update_architecture_review for evidence. Requires configured durable storage.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Initial baseline ArcDiagramData JSON |
question * | string | The concrete architecture question this review will answer |
title * | string | |
agent | object | |
baseUrl | string | |
repository | object |
update_architecture_review
Publish review evidence. Only supplied fields are replaced; omitted fields are preserved. Findings must have stable unique IDs, a severity, and source references (use an empty sources array when evidence is not yet available). Arrays replace their previous contents, and an empty summary clears it. During declared work this renews its five-minute lease. Saved completed reviews are read-only.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | |
decisions | array | |
findings | array | |
openQuestions | array | |
summary | string |
resume_architecture_review
Resume a saved review using its private author capability after the previous MCP owner disconnects. A live owner cannot be displaced. Restored in-progress work is interrupted; declare new work explicitly. Completed reviews remain read-only and can be reopened for viewing. This connection supplies its actual MCP identity; optional agent labels are caller-declared, as when opening a review. Omit agent to use only the new connection identity. Completed artifacts keep their final author unchanged. A new relay may return a new liveUrl.
| Parameter | Type | Description |
|---|---|---|
resumeToken * | string | |
sessionId * | string | |
agent | object | Optional caller-declared display identity for the resumed author; preserves actual MCP client name, version, and connection ID |
baseUrl | string |
begin_live_diagram_work
Declare diagram work before doing it, with a concise summary and optional scope (default canvas). Target existing node IDs or a canvas region where new boxes will appear. Returns workId; always finish that ID with finish_live_diagram_work when done. Only one work item may be active per session. Valid diagram updates renew its five-minute lease; expiry or disconnect interrupts it instead of claiming success.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Live diagram or architecture review opened or resumed on this connection |
summary * | string | What diagram work you are about to perform; concise, honest, and specific |
scope | Canvas, 1–200 unique existing node IDs, or finite canvas coordinates for a planned region |
finish_live_diagram_work
Finish the active declared diagram work using its workId. Leaves the view idle and reusable for the next begin/update/finish cycle. Stale, expired, or already finished work IDs are rejected. Use end_live_diagram only when the entire diagram session is complete.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Live diagram or architecture review opened or resumed on this connection |
workId * | string | Current workId returned by begin_live_diagram_work |
message | string | Short note describing the actual result |
update_live_diagram
Publish the next full diagram revision. Preserve node IDs for smooth moves and use new IDs for new nodes. During declared work this renews its five-minute lease and preserves its scope; otherwise the view stays idle. Invalid diagrams leave the previous revision intact. Only this MCP connection can update its sessions.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Next complete ArcDiagramData JSON |
sessionId * | string | Live diagram or architecture review opened or resumed on this connection |
message | string | Short description of the current architecture change |
end_live_diagram
Mark the entire live architecture session complete, also completing any active declared work. For a reusable idle view use finish_live_diagram_work instead. Ordinary diagrams expire after disconnect; saved architecture reviews remain durable and read-only. Open a new session to continue after ending.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Live diagram or architecture review opened or resumed on this connection |
message | string | Short completion note |
validate_diagram
Validate an ArcDiagramData document. Returns coded diagnostics — consume by `code`, apply one `supportedFixes` entry, re-validate. `ok` is false while any error-severity diagnostic remains.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Arc diagram JSON object or JSON string |
severity | string | Filter returned diagnostics by severity (default: all) |
diff_diagram
Structural diff of two Arc diagrams. Returns a DiagramDelta — added/removed/moved/changed nodes, connector adds/removes/changes (keyed by connector id or from→to), connectorStyles and groups deltas, layoutChanged. Feed it to <ArcDiagram data={head} delta={delta} /> for a diff render.
| Parameter | Type | Description |
|---|---|---|
base * | object | Base ArcDiagramData JSON object or JSON string |
head * | object | Head ArcDiagramData JSON object or JSON string |
auto_layout
Run Arc auto-layout on a diagram. Pass a full diagram or minimal input (nodeData + connectors + connectorStyles).
| Parameter | Type | Description |
|---|---|---|
input * | object | Full ArcDiagramData or AutoDiagramInput (nodeData, connectors, connectorStyles) |
render_ascii
Render an Arc diagram as monospace ASCII/Unicode box art.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
charset | string | Character set (default: unicode) |
maxWidth | integer | Max output width in characters |
render_svg
Render an Arc diagram as deterministic SVG markup using the package export path.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
animateFlows | boolean | Embed SMIL flow animation in the SVG (default: true; ignored when flowTime is set) |
backgroundColor | string | CSS background color (defaults to the theme canvas) |
flowTime | number | Render flow markers at this route second (disables SMIL animation) |
includeGrid | boolean | Render the diagram grid (default: branded themes on, others off) |
mode | string | Color mode; defaults to the theme default |
padding | number | Padding around the export bounds in px (default: 20) |
theme | string | Arc theme id: default, warm, cool, mono, engineering, workbench, tactical, command, spacex, claude, codex, or inherit |
render_png
Render an Arc diagram as a PNG via an installed Chrome/Chromium binary. Returns MCP image content plus render metadata. Set ARC_CHROME if Chrome is not on PATH.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
backgroundColor | string | CSS background color (defaults to the theme canvas) |
flowTime | number | Flow route second to freeze into the PNG (default: 0) |
includeGrid | boolean | Render the diagram grid (default: branded themes on, others off) |
mode | string | Color mode; defaults to the theme default |
padding | number | Padding around the export bounds in px (default: 20) |
scale | number | Raster scale factor (default: 2, max: 4) |
theme | string | Arc theme id: default, warm, cool, mono, engineering, workbench, tactical, command, spacex, claude, codex, or inherit |
render_animation
Render diagram flows as a GIF or MP4 artifact. Uses deterministic frame captures through Chrome plus ffmpeg; requires an `output` path because video payloads are too large for MCP text.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
output * | string | Destination file path for the GIF or MP4 |
backgroundColor | string | CSS background color (defaults to the theme canvas) |
duration | number | Seconds to render (default: one full flow cycle) |
format | string | Output format; inferred from `output` extension when omitted |
fps | number | Frames per second (default: 12 for GIF, 30 for MP4) |
includeGrid | boolean | Render the diagram grid (default: branded themes on, others off) |
mode | string | Color mode; defaults to the theme default |
padding | number | Padding around the export bounds in px (default: 20) |
scale | number | Raster scale factor (default: 2, max: 4) |
theme | string | Arc theme id: default, warm, cool, mono, engineering, workbench, tactical, command, spacex, claude, codex, or inherit |
render_html
Render an Arc diagram as a React component snippet, iframe embed, or standalone HTML page.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
backgroundColor | string | CSS background color for format=html (defaults to the theme canvas) |
baseUrl | string | Studio base URL for format=iframe (default: ARC_EDITOR_URL or http://localhost:5188) |
componentName | string | Component function name for format=component (default: ArcDiagramExample) |
dataName | string | Diagram const name for format=component (default: diagram) |
format | string | Output format: component (TSX), iframe (embed tag), or html (standalone SVG page). Default: html |
height | Iframe height in px or CSS percentage | |
includeGrid | boolean | Render the diagram grid for format=html (default: branded themes on, others off) |
interactive | boolean | Whether the React component is interactive |
mode | string | Color mode; defaults to the theme default |
padding | number | Padding around the export bounds in px for format=html (default: 20) |
sessionId | string | Session id for format=iframe URLs (generated if omitted) |
theme | string | Arc theme id: default, warm, cool, mono, engineering, workbench, tactical, command, spacex, claude, codex, or inherit |
title | string | HTML document title or iframe title |
width | Iframe width in px or CSS percentage |
diagram_to_typescript
Convert a valid Arc diagram JSON into a TypeScript module that exports ArcDiagramData.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
exportName | string | Const name (default: diagram) |
editor_handoff
Build URLs to open a diagram in the Arc studio. Returns a hash-based editor URL and showcase link.
| Parameter | Type | Description |
|---|---|---|
diagram * | object | Valid ArcDiagramData JSON |
baseUrl | string | Studio base URL (default: ARC_EDITOR_URL or http://localhost:5188) |
sessionId | string | Session id (generated if omitted) |
view | string | Guided view id to start on (data.views[].id) — deep-links the player chapter |