Archform

v0.2.2
io.github.himanshu-mamgain/archform Checked 2 days ago Published 1 month ago

Render and validate diagrams as code: Mermaid, PlantUML, C4, Graphviz, D2 and more.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_formats List diagram formats

List the diagram languages this server can render (Mermaid, PlantUML, C4-PlantUML, Graphviz, D2, Structurizr, BPMN, Excalidraw), with each one's aliases, supported outputs (svg, png), syntax docs link and a minimal valid example. Call this before writing a diagram in a format you are unsure of, or to check whether PNG output is available.

render_diagram Render diagram

Render diagram source (Mermaid, PlantUML, C4-PlantUML, Graphviz/DOT, D2, Structurizr, BPMN, Excalidraw) to an SVG or PNG image, and get a shareable link that opens the diagram in a browser. Use it when the user wants to see a diagram. If the source is invalid the result is an error with the parser message and line number: fix the source and retry. Call validate_diagram to check syntax without rendering, or list_formats for examples and which formats support PNG.

ParameterTypeDescription
format *stringDiagram language. One of: mermaid, plantuml, c4plantuml, graphviz, d2, structurizr, bpmn, excalidraw, dot ("dot" is an alias for graphviz).
source *stringThe diagram source text, exactly as it would appear in a file of that format.
outputstringImage type. Defaults to svg. d2, bpmn and excalidraw support svg only.

validate_diagram Validate diagram

Check whether diagram source (Mermaid, PlantUML, C4-PlantUML, Graphviz/DOT, D2, Structurizr, BPMN, Excalidraw) is valid, without returning an image. Returns { valid, errors: [{ line?, message }] }. Use it to check syntax you are unsure of before rendering or before handing diagram code to the user. Call list_formats for a valid example of each format.

ParameterTypeDescription
format *stringDiagram language. One of: mermaid, plantuml, c4plantuml, graphviz, d2, structurizr, bpmn, excalidraw, dot ("dot" is an alias for graphviz).
source *stringThe diagram source text, exactly as it would appear in a file of that format.