Data Visualization
Generate interactive tree diagrams from hierarchical data with customizable styling
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/tree-diagram-generator' \
-H 'Content-Type: application/json' \
-d '{"treeData":"JSON: [{"name": "Root", "value": 100,\n "children": [\n {"name": "Branch 1", "value": 50},\n {"name": "Branch 2", "value": 30}\n ]\n}]\n\nor text:\nRoot:100\nRoot:Branch 1:50\nRoot:Branch 2:30","chartTitle":"Enter chart title...","nodeShape":"circle","nodeColor":"#3b82f6","nodeTextColor":"#ffffff","lineColor":"#6b7280","backgroundColor":"#ffffff","nodeSize":"40","fontSize":"12","lineWidth":"2","chartHeight":"600","showLabels":true,"showValues":true}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/tree-diagram-generator| Name | Type | Required | Description |
|---|---|---|---|
| treeData | textarea | Yes | Hierarchical data for the tree. Supports JSON object or parent:child:value text format |
| chartTitle | text | No | Title that will be displayed above the chart |
| nodeShape | select | No | — |
| nodeColor | color | No | Color for the tree nodes |
| nodeTextColor | color | No | Color for the node text |
| lineColor | color | No | Color for the connecting lines |
| backgroundColor | color | No | Background color for the chart container |
| nodeSize | number | No | Size of nodes in pixels |
| fontSize | number | No | Font size for node text |
| lineWidth | number | No | Width of connecting lines |
| chartHeight | number | No | Height of the chart in pixels |
| showLabels | checkbox | No | Display text labels on nodes |
| showValues | checkbox | No | Display numeric values on nodes |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-tree-diagram-generator": {
"name": "tree-diagram-generator",
"description": "Generate interactive tree diagrams from hierarchical data with customizable styling",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=tree-diagram-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "tree-diagram-generator",
"arguments": {
"treeData": "JSON: [{"name": "Root", "value": 100,\n "children": [\n {"name": "Branch 1", "value": 50},\n {"name": "Branch 2", "value": 30}\n ]\n}]\n\nor text:\nRoot:100\nRoot:Branch 1:50\nRoot:Branch 2:30",
"chartTitle": "Enter chart title...",
"nodeShape": "circle",
"nodeColor": "#3b82f6",
"nodeTextColor": "#ffffff",
"lineColor": "#6b7280",
"backgroundColor": "#ffffff",
"nodeSize": "40",
"fontSize": "12",
"lineWidth": "2",
"chartHeight": "600",
"showLabels": true,
"showValues": true
}
}
}Questions or issues? Contact [email protected]