Data Analysis

Tools for data visualization including Mermaid diagrams, charts, and other visual representations.

/api/tools/data-analysis

2 Tools

preview_mermaid_diagram

Render a mermaid diagram to preview. Use to validate syntax and see layout before presenting to user.

Tool

Endpoint

POST /api/tools/data-analysis

Input Schema

code *
string
Mermaid diagram code (without code fences). Supports flowchart, sequence, class, state, ER, gantt, pie, and mindmap diagrams.
theme
string
Mermaid theme for styling the diagram (default: "default").
backgroundColor
string
Background color for the image as hex code (default: "#ffffff").
scale
number
Scale factor for higher resolution output (default: 1, use 2 for retina).
View full schema
{ "type": "object", "properties": { "code": { "type": "string", "description": "Mermaid diagram code (without code fences). Supports flowchart, sequence, class, state, ER, gantt, pie, and mindmap diagrams." }, "theme": { "type": "string", "enum": [ "default", "dark", "forest", "neutral" ], "description": "Mermaid theme for styling the diagram (default: \"default\")." }, "backgroundColor": { "type": "string", "description": "Background color for the image as hex code (default: \"#ffffff\")." }, "scale": { "type": "number", "description": "Scale factor for higher resolution output (default: 1, use 2 for retina)." } }, "required": [ "code" ] }

preview_mockup

Render an SVG mockup artifact to a PNG preview. The SVG must first be written as an artifact using write_artifact, then pass the artifact path here.

Tool

Endpoint

POST /api/tools/data-analysis

Input Schema

artifact *
string
Artifact path to the SVG file (as returned by write_artifact), e.g. "files/mockup.svg".
scale
number
Scale factor for higher resolution output (default: 2 for retina).
backgroundColor
string
Background color for the image as hex code (default: "#ffffff").
View full schema
{ "type": "object", "properties": { "artifact": { "type": "string", "description": "Artifact path to the SVG file (as returned by write_artifact), e.g. \"files/mockup.svg\"." }, "scale": { "type": "number", "description": "Scale factor for higher resolution output (default: 2 for retina)." }, "backgroundColor": { "type": "string", "description": "Background color for the image as hex code (default: \"#ffffff\")." } }, "required": [ "artifact" ] }