GraphiForge Unified Tool Pipeline — Dual-Surface API Reference

Mechanically generated from the Single-Point TypeSpec (.tsp) SSOT contract. Every operation below exposes a deterministic Stage 1 CLI command (graphiforge) and a 1:1 Stage 2 MCP tool governed by R1~R5 reserved interfaces.

24
Domain Endpoints
9
Reserved R1~R5 Tools
5
Handoff Protocols
@toolGroup("diagram")

DIAGRAM API — GraphiForge DOT validation, analysis, querying, autofix, diff, and template operations

6 endpoints
POST /tools/diagram/analyze diagramAnalyze inspect

graphiforge diagram analyze · diagram_analyze

Compute graph complexity, density, degree distribution, and cycle metrics

STAGE 1 CLI SYNOPSIS graphiforge diagram analyze [filePath] [-s|--source <dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string

Response Attributes 200 OK · structuredContent

Field Type Requirement
nodeCount integer required
edgeCount integer required
subgraphCount integer required
density number required
isDirected boolean required
hasCycles boolean required
POST /tools/diagram/diff diagramDiff inspect

graphiforge diagram diff · diagram_diff

Compute structural AST diff between two Graphviz DOT diagrams

STAGE 1 CLI SYNOPSIS graphiforge diagram diff <beforeSource> <afterSource> [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
beforeSource required Pos #0 · -a, --before string Path to baseline DOT file or inline DOT string
afterSource required Pos #1 · -b, --after string Path to target DOT file or inline DOT string

Response Attributes 200 OK · structuredContent

Field Type Requirement
hasChanges boolean required
addedNodes string[] required
removedNodes string[] required
addedEdges integer required
removedEdges integer required
POST /tools/diagram/fix diagramFix apply R1 Undo --dry-run

graphiforge diagram fix · diagram_fix

Automatically repair common DOT syntax and attribute lint issues with R1 undo and R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge diagram fix [filePath] [-o|--output <out.dot>] [-s|--source <dot>] [-e|--expected-before-fingerprint <sha256>] [-p|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:true view: diagram-fix-preview

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
outPath optional -o, --output <out.dot> string Optional output file path to write fixed DOT source
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
fixed boolean required
appliedCount integer required
beforeFingerprint string required
afterFingerprint string required
outPath string optional
dotSource string required
POST /tools/diagram/query diagramQuery inspect

graphiforge diagram query · diagram_query

Filter nodes, edges, and subgraphs using GraphiForge selector queries

STAGE 1 CLI SYNOPSIS graphiforge diagram query [filePath] [selector] [-s|--source <dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
selector optional Pos #1 · -q, --selector string
default: "node"
Query DSL predicate over the diagram's nodes: a bare kind (node) or an expression such as shape:box or kind:node && label~api; a selector that does not parse is an error
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string

Response Attributes 200 OK · structuredContent

Field Type Requirement
selector string required
matchCount integer required
matches any[] required
POST /tools/diagram/template diagramTemplate inspect

graphiforge diagram template · diagram_template

List or export built-in GraphiForge diagram format presets

STAGE 1 CLI SYNOPSIS graphiforge diagram template [presetId] [-c|--category <category>] [-o|--output <out.dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
presetId optional Pos #0 · -p, --preset string Optional preset ID to inspect or export (omit to list all presets)
category optional -c, --category <category> string Optional category filter
outPath optional -o, --output <out.dot> string Optional file path to export template DOT source

Response Attributes 200 OK · structuredContent

Field Type Requirement
total integer required
presetId string optional
dotSource string optional
presets any[] required
POST /tools/diagram/validate diagramValidate verify

graphiforge diagram validate · diagram_validate

Validate Graphviz DOT syntax, structural semantics, and layout lint rules

STAGE 1 CLI SYNOPSIS graphiforge diagram validate [filePath] [-s|--source <dot>] [--json]
STAGE 2 MCP METADATA
model: verification-gate lock: shared-read RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string

Response Attributes 200 OK · structuredContent

Field Type Requirement
valid boolean required
errorCount integer required
warningCount integer required
diagnostics any[] required
@toolGroup("lifecycle")

LIFECYCLE API — 5-Stage Diagram Lifecycle Engine (저장 Save/Restore · 조회 Query/Focus · 수정 Update/Snap · 삭제 Cascade/Heal Delete · 활용 Utilize/Handoff)

5 endpoints
POST /tools/lifecycle/delete lifecycleDelete destructive R1 Undo --dry-run

graphiforge lifecycle delete · lifecycle_delete

Stage 4 (삭제 Delete): Delete a node, cluster, or edge using 'cascade' mode or BPMN 'heal' bridge reconnect mode (A -> X -> B => A -> B) with OCC fingerprint verification, R1 undo, and R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge lifecycle delete [filePath] <targetId> [-k|--kind <node|cluster|edge>] [-m|--mode <cascade|heal>] [-o|--output <out.dot>] [-e|--expected-before-fingerprint <sha256>] [-s|--source <dot>] [-p|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-elicit-commit lock: exclusive-file RO:false / D:true / I:false view: lifecycle-delete-diff

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
targetId required Pos #1 · -t, --target string Target nodeId, clusterName, or edge graphvizId to delete
targetKind optional -k, --kind <node|cluster|edge> "node" | "cluster" | "edge"
default: "node"
Target object kind to delete (node, cluster, edge)
mode optional -m, --mode <cascade|heal> "cascade" | "heal"
default: "cascade"
Deletion mode: 'cascade' removes target and incident edges; 'heal' bridges incoming predecessors to outgoing successors (A -> X -> B => A -> B)
outPath optional -o, --output <out.dot> string Optional output path for updated DOT source (defaults to in-place update of filePath)
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) SHA-256 fingerprint from Stage 1 plan/handoff
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
mode "cascade" | "heal" required
targetKind string required
targetId string required
deletedObjectCount integer required
deletedNodeIds string[] required
bridgedEdges any[] required
beforeFingerprint string required
afterFingerprint string required
outPath string optional
dotSource string required
POST /tools/lifecycle/query lifecycleQuery inspect

graphiforge lifecycle query · lifecycle_query

Stage 2 (조회 Query & Focus-Slice): Filter nodes, edges, and clusters by keyword, cluster scope, shape, degree range, or 1-hop neighborhood focus set and extract a standalone slice DOT

STAGE 1 CLI SYNOPSIS graphiforge lifecycle query [filePath] [text] [-k|--kind <all|node|edge|cluster>] [-c|--cluster <cluster_name|root>] [-S|--shape <shape>] [--min-degree <n>] [--max-degree <n>] [-F|--focus <nodeId>] [-D|--direction <both|incoming|outgoing>] [-o|--output <slice.dot>] [-s|--source <dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true view: lifecycle-query-slice

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
text optional Pos #1 · -q, --text string Case-insensitive keyword filter across nodeId, label, clusterName, and shape
kind optional -k, --kind <all|node|edge|cluster> "all" | "node" | "edge" | "cluster"
default: "all"
Object kind filter (all, node, edge, cluster)
clusterScope optional -c, --cluster <cluster_name|root> string Filter objects inside a specific subgraph cluster_* (or 'root' for top-level nodes)
shape optional -S, --shape <shape> string Filter nodes by effective or local shape (e.g. box, cylinder, diamond, cds)
minDegree optional --min-degree <n> integer Minimum total incident edge degree (inDegree + outDegree)
maxDegree optional --max-degree <n> integer Maximum total incident edge degree (inDegree + outDegree)
focusNodeId optional -F, --focus <nodeId> string Seed node ID or cluster name for 1-hop neighborhood focus set extraction
focusDirection optional -D, --direction <both|incoming|outgoing> "both" | "incoming" | "outgoing"
default: "both"
Neighborhood traversal direction when focusNodeId is set
outPath optional -o, --output <slice.dot> string Optional output file path to write the extracted standalone slice DOT
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string

Response Attributes 200 OK · structuredContent

Field Type Requirement
matchedNodeCount integer required
matchedEdgeCount integer required
matchedClusterCount integer required
totalNodes integer required
totalEdges integer required
totalClusters integer required
matchedNodes any[] required
matchedEdges any[] required
matchedClusters any[] required
focusSet any optional
outPath string optional
sliceDotSource string required
POST /tools/lifecycle/save lifecycleSave apply R1 Undo --dry-run

graphiforge lifecycle save · lifecycle_save

Stage 1 (저장 Save & Restore): Package or restore Canonical DOT, sourceFingerprint, and 4-tier object lineage sidecar into a portable dotstudio.diagram-lifecycle-bundle with R1 undo and R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge lifecycle save [filePath] [-b|--bundle <path.bundle.json>] [-R|--restore] [-o|--output <out.dot>] [-T|--title <title>] [-t|--theme <preset>] [-s|--source <dot>] [-e|--expected-before-fingerprint <sha256>] [-p|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:false view: lifecycle-bundle-viewer

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
bundlePath optional -b, --bundle <path.bundle.json> string Path to write or read the portable Diagram Lifecycle Bundle (.bundle.json)
restoreFromBundle optional -R, --restore boolean
default: false
Restore Canonical DOT and object lineage from bundlePath instead of saving
outPath optional -o, --output <out.dot> string Optional output DOT file path when restoring a bundle
title optional -T, --title <title> string Optional diagram bundle title
theme optional -t, --theme <preset> string
default: "cloud-light"
Active visual theme preset ID stored in the bundle
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
schema string required
version string required
mode "save" | "restore" required
title string required
sourceFingerprint string required
beforeFingerprint string required
afterFingerprint string required
exactFingerprintMatch boolean required
nodeCount integer required
edgeCount integer required
clusterCount integer required
lineageObjectCount integer required
bundlePath string optional
outPath string optional
dotSource string required
POST /tools/lifecycle/update lifecycleUpdate apply R1 Undo --dry-run

graphiforge lifecycle update · lifecycle_update

Stage 3 (수정 Update): Apply in-place AST mutations (rename-node, move-node-scope, update-attributes, promote-box-to-cluster, nudge-label) with OCC fingerprint verification, R1 undo, and R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge lifecycle update [filePath] [action] [-n|--node <nodeId>] [-x|--dx <px>] [-y|--dy <px>] [-N|--new-id <newNodeId>] [-c|--target-cluster <cluster_name>] [-l|--label <label>] [-S|--shape <shape>] [-A|--attributes <json>] [-o|--output <out.dot>] [-e|--expected-before-fingerprint <sha256>] [-s|--source <dot>] [-p|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:false view: lifecycle-mutation-diff

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
action optional Pos #1 · -a, --action "rename-node" | "move-node-scope" | "update-attributes" | "promote-box-to-cluster" | "nudge-label" | "auto-resolve-text-overlaps"
default: "rename-node"
AST update action to apply (including label micro-nudge and automatic text-overlap resolution)
nodeId optional -n, --node <nodeId> string Target node ID (or cluster/edge ID for update-attributes and nudge-label)
dx optional -x, --dx <px> integer Horizontal fine-positioning offset in SVG user units (px) for nudge-label
dy optional -y, --dy <px> integer Vertical fine-positioning offset in SVG user units (px) for nudge-label
newNodeId optional -N, --new-id <newNodeId> string New node ID for rename-node, or inner child node ID for promote-box-to-cluster
targetClusterName optional -c, --target-cluster <cluster_name> string Target subgraph cluster_* name for move-node-scope or promote-box-to-cluster
label optional -l, --label <label> string Optional updated display label (an empty label blanks it)
shape optional -S, --shape <shape> string Optional updated node shape
attributes optional -A, --attributes <json> object Optional JSON dictionary of attributes to set or remove (null removes attribute)
outPath optional -o, --output <out.dot> string Optional output path for updated DOT source (defaults to in-place update of filePath)
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) SHA-256 fingerprint from Stage 1 plan/handoff
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
action string required
valid boolean required
patchCount integer required
beforeFingerprint string required
afterFingerprint string required
outPath string optional
lineDiff any optional
dotSource string required
POST /tools/lifecycle/utilize lifecycleUtilize handoff

graphiforge lifecycle utilize · lifecycle_utilize

Stage 5 (활용 Utilize): Build a complete downstream Utilization Package containing root/leaf/orphan structural summary, baseline diff, CLI recipes, and handoff-envelope/v1

STAGE 1 CLI SYNOPSIS graphiforge lifecycle utilize [filePath] [-b|--baseline <baseline.dot>] [-t|--theme <preset>] [-o|--output <out.json>] [-s|--source <dot>] [-p|--project <id>] [--json]
STAGE 2 MCP METADATA
model: handoff-bridge lock: shared-read RO:false / D:true / I:false view: lifecycle-utilization-portal

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
baselinePath optional -b, --baseline <baseline.dot> string Optional baseline DOT file path or inline DOT string to compute structural and line diffs
theme optional -t, --theme <preset> string
default: "cloud-light"
Visual theme preset ID (or theme JSON file) for generated CLI & MCP recipes. A theme `style` would reject is an error.
outPath optional -o, --output <out.json> string Optional output file path to write the complete Utilization Package JSON. The package records when it was built (`mcpHandoffEnvelope.timestamp`), so a repeated call rewrites it.
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
sourceFingerprint string required
themeId string required
structuralSummary any required
changedFromBaseline boolean required
diffFromBaseline any optional
cliRecipes object required
cliRecipesUnavailable string optional
mcpHandoffEnvelope any required
outPath string optional
canonicalDot string required
@toolGroup("mcp")

MCP API — Stage 2 MCP server surface, SEP-2640 skills snapshot, and spec-driven documentation generators

3 endpoints
POST /tools/mcp/export-skills mcpExportSkillsSnapshot handoff

graphiforge mcp export-skills · mcp_export_skills

Export SEP-2640 io.modelcontextprotocol/skills immutable SkillsSnapshot with SHA-256 ETag

STAGE 1 CLI SYNOPSIS graphiforge mcp export-skills [skillDir] [-o|--out <path>] [--json]
STAGE 2 MCP METADATA
model: handoff-bridge lock: shared-read RO:false / D:true / I:false

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
skillDir optional Pos #0 · -d, --skill-dir string Path to skill package directory (defaults to the skills-packages/cli-anything-graphiforge package bundled with GraphiForge; --state-dir does not move it)
outFile optional -o, --out <path> string Optional output JSON file path for the exported SEP-2640 SkillsSnapshot

Response Attributes 200 OK · structuredContent

Field Type Requirement
capability string required
etag string required
skillCount integer required
skills any[] required
POST /tools/mcp/inspect mcpInspect inspect

graphiforge mcp inspect · mcp_inspect

Inspect hydrated Stage 2 MCP tools and reserved R1~R5 governance interfaces

STAGE 1 CLI SYNOPSIS graphiforge mcp inspect [-r|--reserved] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
includeReserved optional -r, --reserved boolean
default: true
Include reserved R1~R5 MCP interface tools

Response Attributes 200 OK · structuredContent

Field Type Requirement
title string required
version string required
domainToolCount integer required
reservedToolCount integer required
reservedInterfaces string[] required
operationIds string[] required
reservedToolNames string[] required
POST /tools/mcp/sync-skill-table mcpSyncSkillTable inspect

graphiforge mcp sync-skill-table · mcp_sync_skill_table

Mechanically generate CLI & MCP Markdown lookup tables, full API manual, or interactive HTML portal from .tsp SSOT

STAGE 1 CLI SYNOPSIS graphiforge mcp sync-skill-table [outFile] [-b|--bin <name>] [-m|--format <table|manual|html>] [-F|--full] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
outFile optional Pos #0 · -o, --out-file string Optional file path to write the generated Markdown or HTML portal
binName optional -b, --bin <name> string
default: "graphiforge"
CLI binary name to render in generated command tables
format optional -m, --format <table|manual|html> "table" | "manual" | "html"
default: "table"
Output format: 'table' (compact Markdown), 'manual' (full Markdown API spec), or 'html' (interactive 2-column API portal)
full optional -F, --full boolean
default: false
Alias for --format manual

Response Attributes 200 OK · structuredContent

Field Type Requirement
operationCount integer required
format string required
outFile string optional
markdown string required
@toolGroup("style")

STYLE API — Overlap-free styled SVG rendering, theme presets, and contrast harmonization

7 endpoints
POST /tools/style/apply-theme styleApplyTheme apply R1 Undo --dry-run

graphiforge style apply-theme · style_apply_theme

Apply a theme preset and node fill contrast harmonization to a DOT diagram with R1 undo

STAGE 1 CLI SYNOPSIS graphiforge style apply-theme [filePath] [-t|--theme <preset>] [-o|--output <out.dot>] [-s|--source <dot>] [-e|--expected-before-fingerprint <sha256>] [-p|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
theme optional -t, --theme <preset> string
default: "cloud-light"
Theme preset name or short alias
outPath optional -o, --output <out.dot> string Optional output path for themed DOT source
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot

Response Attributes 200 OK · structuredContent

Field Type Requirement
theme string required
beforeFingerprint string required
afterFingerprint string required
outPath string optional
dotSource string required
POST /tools/style/build-gallery styleBuildGallery inspect

graphiforge style build-gallery · style_build_gallery

Generate or inspect GraphiForge's standalone interactive HTML visual portals (gallery-hub.html, theme-gallery.html, edge-design-catalog.html)

STAGE 1 CLI SYNOPSIS graphiforge style build-gallery [target] [-o|--output <dir-or-file>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
target optional Pos #0 · -t, --target string
default: "hub"
Gallery portal target to generate or inspect (hub, theme-gallery, edge-catalog, or all)
outPath optional -o, --output <dir-or-file> string Optional output directory or HTML file path (defaults to ./galleries)

Response Attributes 200 OK · structuredContent

Field Type Requirement
target string required
outDir string required
generatedFiles string[] required
portals any[] required
POST /tools/style/edge-specs styleEdgeSpecs inspect

graphiforge style edge-specs · style_edge_specs

Inspect or filter GraphiForge's 24 built-in edge authoring styles (7 strokes, 9 terminal/ERD crow's foot markers, 8 compass port & multi-label syntaxes)

STAGE 1 CLI SYNOPSIS graphiforge style edge-specs [category] [-q|--query <search>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
category optional Pos #0 · -c, --category string Optional edge authoring spec category filter (stroke, marker, port)
query optional -q, --query <search> string Optional keyword filter across id, name, dotAttr, and semanticUse

Response Attributes 200 OK · structuredContent

Field Type Requirement
total integer required
strokeCount integer required
markerCount integer required
portCount integer required
specs any[] required
POST /tools/style/list-presets styleListPresets inspect

graphiforge style list-presets · style_list_presets

List all built-in GraphiForge visual theme presets and short aliases

STAGE 1 CLI SYNOPSIS graphiforge style list-presets [-m|--mode <light|dark>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
mode optional -m, --mode <light|dark> string Optional filter by light or dark mode

Response Attributes 200 OK · structuredContent

Field Type Requirement
total integer required
presets any[] required
aliases object required
POST /tools/style/patterns stylePatterns inspect

graphiforge style patterns · style_patterns

List or scaffold GraphiForge's 8 edge routing geometries and 6 situational line alignment recipes (S1~S6) into runnable DOT source

STAGE 1 CLI SYNOPSIS graphiforge style patterns [patternId] [-o|--output <out.dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
patternId optional Pos #0 · -i, --id string Optional routing geometry ID (ortho-rounded, ortho, ortho-bridge, bus, erd-step, spline, polyline, straight) or situational recipe code/ID (S1~S6, spine-axis, same-rank-peer, feedback-loop, monochrome-semantics, fanout-bus-distribution, erd-port-rail-offset)
outPath optional -o, --output <out.dot> string Optional file path to scaffold/export the selected pattern's runnable DOT source

Response Attributes 200 OK · structuredContent

Field Type Requirement
routingGeometriesCount integer required
situationalRecipesCount integer required
selectedPattern any optional
outPath string optional
dotSource string optional
routingGeometries any[] required
situationalRecipes any[] required
POST /tools/style/render styleRender apply R1 Undo --dry-run

graphiforge style render · style_render

Render a DOT diagram into an overlap-free, theme-styled standalone SVG with pill backdrops, foreground labels, drop-shadows, and R1/R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge style render [filePath] [-o|--output <out.svg>] [-t|--theme <preset>] [-r|--routing <mode>] [-J|--line-jump] [-b|--bg <color>] [-p|--padding <px>] [-F|--font <family>] [-S|--shadow] [-s|--source <dot>] [-e|--expected-before-fingerprint <sha256>] [-P|--project <id>] [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:true view: styled-svg-preview

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
filePath optional Pos #0 · -f, --file string Path to input Graphviz DOT file
outPath optional -o, --output <out.svg> string Output file path for overlap-free styled SVG
theme optional -t, --theme <preset> string
default: "cloud-light"
Theme preset or alias (cloud-light, high-contrast, nordic-frost, emerald-mint, lavender-indigo, amber-sand, rose-quartz, cloud-dark, enterprise-blueprint, obsidian-emerald, cyberpunk-neon, etc.)
routing optional -r, --routing <mode> string
default: "auto"
Edge routing geometry (auto, ortho-rounded, ortho, bus, erd-step, spline, polyline, straight, curved)
lineJump optional -J, --line-jump boolean
default: false
Insert semicircular jump bridges (A 5.5,5.5) where horizontal edges cross vertical edges
bg optional -b, --bg <color> string Optional canvas background color override
padding optional -p, --padding <px> integer
default: 16
Canvas viewBox breathing-room padding in pixels
fontFamily optional -F, --font <family> string Optional typography font-family override
shadow optional -S, --shadow boolean
default: true
Inject soft elevation drop-shadow filter on diagram nodes
dotSource optional -s, --source <dot> string Inline Graphviz DOT source string
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
projectId optional -P, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff

Response Attributes 200 OK · structuredContent

Field Type Requirement
theme string required
routing string optional
lineJump boolean optional
padding integer required
shadow boolean required
svgByteLength integer required
beforeFingerprint string required
afterFingerprint string required
outPath string optional
svg string required
POST /tools/style/scenarios styleScenarios inspect

graphiforge style scenarios · style_scenarios

List, search, or scaffold GraphiForge's 10 end-to-end user scenario playbooks (U1~U10) with recommended theme, routing, CLI/MCP workflows, and runnable DOT templates

STAGE 1 CLI SYNOPSIS graphiforge style scenarios [scenarioId] [-q|--query <search>] [-o|--output <out.dot>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:false / D:true / I:true

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
scenarioId optional Pos #0 · -i, --id string Optional user scenario code or ID (U1~U10, cloud-msa-architecture, high-contrast-paper-patent, erd-multi-fk-schema, event-driven-fanout-bus, ha-active-standby-replication, noc-dark-blueprint-ops, fsm-state-machine-audit, legacy-dot-modernization, multi-agent-2stage-handoff, ci-batch-governance-loop)
query optional -q, --query <search> string Optional keyword filter across persona, situation, theme, routing, or recipe
outPath optional -o, --output <out.dot> string Optional file path to scaffold/export the selected user scenario's runnable DOT source

Response Attributes 200 OK · structuredContent

Field Type Requirement
total integer required
selectedScenario any optional
outPath string optional
dotSource string optional
scenarios any[] required
@toolGroup("table")

TABLE API — 6-Type Document Standard Table Adapter (UnifiedTableIR) including Graphviz ERD <TABLE> nodes

3 endpoints
POST /tools/table/apply-ops tableApplyOps apply R1 Undo --dry-run

graphiforge table apply-ops · table_apply_ops

Apply deterministic mutations to a UnifiedTableIR (including in-place .dot ERD <TABLE> updates) with R1 undo and R4 handoff

STAGE 1 CLI SYNOPSIS graphiforge table apply-ops [adapterKind] [-f|--file <path>] [-i|--table-index <index>] [-o|--output <path>] [-t|--table-id <id>] [-p|--project <id>] [-e|--expected-before-fingerprint <sha256>] [--headers <json>] [--rows <json>] -O|--operations <json> [--dry-run] [--json]
STAGE 2 MCP METADATA
model: two-phase-commit lock: exclusive-file RO:false / D:true / I:false view: table-diff-preview

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
adapterKind optional Pos #0 · -a, --adapter "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom"
default: "visual-dom"
Document table adapter kind (calc, writer, impress, markdown, tabular-ops, visual-dom)
filePath optional -f, --file <path> string Input document or diagram file path (.dot, .svg, .html, .md, .csv, .xlsx, .docx, .pptx)
tableIndex optional -i, --table-index <index> integer
default: 0
0-based index of the table or sheet within the document
outPath optional -o, --output <path> string Output document path to write updated table (defaults to in-place update of filePath). Its extension picks the format (.xlsx, .docx, .pptx, .md, .markdown, .csv, .tsv, .html, .htm, .svg, .dot, .gv); any other extension, or none, is rejected before anything is written
tableId optional -t, --table-id <id> string Logical table identifier
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
headers optional --headers <json> string[] Optional seed headers
rows optional --rows <json> any[][] Optional seed rows
operations required -O, --operations <json> object[] Ordered list of deterministic table cell/row/column mutations

Response Attributes 200 OK · structuredContent

Field Type Requirement
tableId string required
adapterKind "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom" required
tableIndex integer required
beforeFingerprint string required
afterFingerprint string required
changedCellCount integer required
markdownPreview string required
outPath string optional
table object required
POST /tools/table/extract tableExtract inspect

graphiforge table extract · table_extract

Extract a document or Graphviz ERD <TABLE> into canonical UnifiedTableIR with SHA-256 fingerprint

STAGE 1 CLI SYNOPSIS graphiforge table extract [adapterKind] [-f|--file <path>] [-i|--table-index <index>] [-t|--table-id <id>] [--headers <json>] [--rows <json>] [--json]
STAGE 2 MCP METADATA
model: single-phase lock: none RO:true / D:false / I:true view: table-ir-viewer

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
adapterKind optional Pos #0 · -a, --adapter "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom"
default: "visual-dom"
Document table adapter kind (calc, writer, impress, markdown, tabular-ops, visual-dom)
filePath optional -f, --file <path> string Real document or diagram file path (.dot, .svg, .html, .md, .csv, .xlsx, .docx, .pptx)
tableIndex optional -i, --table-index <index> integer
default: 0
0-based index of the table or sheet within the document (e.g. N-th ERD entity <TABLE> in .dot)
tableId optional -t, --table-id <id> string Logical table identifier
headers optional --headers <json> string[] Optional seed headers for in-memory table
rows optional --rows <json> any[][] Optional seed 2D rows for in-memory table

Response Attributes 200 OK · structuredContent

Field Type Requirement
irVersion "unified-table-ir/v1" required
tableId string required
adapterKind "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom" required
tableIndex integer required
sourceUri string required
rowCount integer required
colCount integer required
fingerprint string required
markdownPreview string required
table object required
POST /tools/table/plan-ops tablePlanOps plan --dry-run

graphiforge table plan-ops · table_plan_ops

Plan cell/row/column mutations on a UnifiedTableIR and compute before/after fingerprints without mutating state

STAGE 1 CLI SYNOPSIS graphiforge table plan-ops [adapterKind] [-f|--file <path>] [-i|--table-index <index>] [-o|--output <path>] [-t|--table-id <id>] [-p|--project <id>] [-e|--expected-before-fingerprint <sha256>] [--headers <json>] [--rows <json>] -O|--operations <json> [--dry-run] [--json]
STAGE 2 MCP METADATA
model: plan-only lock: shared-read RO:true / D:false / I:true view: table-diff-preview

Request Parameters application/json & CLI Flags

Parameter CLI Binding Type & Default Description
adapterKind optional Pos #0 · -a, --adapter "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom"
default: "visual-dom"
Document table adapter kind (calc, writer, impress, markdown, tabular-ops, visual-dom)
filePath optional -f, --file <path> string Input document or diagram file path (.dot, .svg, .html, .md, .csv, .xlsx, .docx, .pptx)
tableIndex optional -i, --table-index <index> integer
default: 0
0-based index of the table or sheet within the document
outPath optional -o, --output <path> string Output document path to write updated table (defaults to in-place update of filePath). Its extension picks the format (.xlsx, .docx, .pptx, .md, .markdown, .csv, .tsv, .html, .htm, .svg, .dot, .gv); any other extension, or none, is rejected before anything is written
tableId optional -t, --table-id <id> string Logical table identifier
projectId optional -p, --project <id> string
default: "default"
Project session identifier for R1 undo snapshot and R4 handoff
expectedBeforeFingerprint optional -e, --expected-before-fingerprint <sha256> string Optional optimistic concurrency control (OCC) fingerprint from Stage 1 plan/handoff
headers optional --headers <json> string[] Optional seed headers
rows optional --rows <json> any[][] Optional seed rows
operations required -O, --operations <json> object[] Ordered list of deterministic table cell/row/column mutations

Response Attributes 200 OK · structuredContent

Field Type Requirement
tableId string required
adapterKind "calc" | "writer" | "impress" | "markdown" | "tabular-ops" | "visual-dom" required
tableIndex integer required
beforeFingerprint string required
afterFingerprint string required
changedCellCount integer required
markdownPreview string required
outPath string optional
table object required