Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Data Visualization

Tree Diagram Generator

Generate interactive tree diagrams from hierarchical data with customizable styling

html· HTML resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
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}'

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools

API reference

Send a POST request with your inputs as JSON. File parameters require a separate upload first.

Endpoint

HTTP
POST https://api.elysiatools.com/en/api/tools/tree-diagram-generator

Parameters

NameTypeRequiredDescription
treeDatatextareaYesHierarchical data for the tree. Supports JSON object or parent:child:value text format
chartTitletextNoTitle that will be displayed above the chart
nodeShapeselectNo—
nodeColorcolorNoColor for the tree nodes
nodeTextColorcolorNoColor for the node text
lineColorcolorNoColor for the connecting lines
backgroundColorcolorNoBackground color for the chart container
nodeSizenumberNoSize of nodes in pixels
fontSizenumberNoFont size for node text
lineWidthnumberNoWidth of connecting lines
chartHeightnumberNoHeight of the chart in pixels
showLabelscheckboxNoDisplay text labels on nodes
showValuescheckboxNoDisplay numeric values on nodes

Response format

HTML result

JSON
{
  "result": "<div>Processed HTML content</div>",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}

MCP integration

Add this tool to your Model Context Protocol server so AI agents can list and call it.

Server configuration

Add this block to your MCP client configuration:

mcp.json
{
  "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"
    }
  }
}

List available tools

After connecting to the SSE endpoint, list the exposed tools:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "tree-diagram-generator",
    "arguments": {
  "treeData": "JSON: [{&quot;name&quot;: &quot;Root&quot;, &quot;value&quot;: 100,\n  &quot;children&quot;: [\n    {&quot;name&quot;: &quot;Branch 1&quot;, &quot;value&quot;: 50},\n    {&quot;name&quot;: &quot;Branch 2&quot;, &quot;value&quot;: 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
}
  }
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).

Questions or issues? Contact [email protected]

Browse tools
Open tool