generate_chartjs_tool
Generate interactive Chart.js visualizations from structured data. Supports multiple chart types and custom titles.
Instructions
Generate interactive Chart.js visualizations from structured data.
Args: data: Structured data in MCP format with required structure: { "columns": [ { "name": str, # Column name "type": str, # "string" or "number" "examples": list # Array of values }, ... # Additional columns ] } Example: { "columns": [ { "name": "Category", "type": "string", "examples": ["A", "B", "C"] }, { "name": "Value", "type": "number", "examples": [10, 20, 30] } ] } chart_types: List of supported chart types to generate (first is used) title: Chart title string request_params: Additional visualization parameters (optional)
Returns: dict: Result with structure: { "status": "SUCCESS"|"ERROR", "chart_html": str, # Generated HTML content "chart_type": str, # Type of chart generated "html_path": str # Path to saved HTML file }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| chart_types | No | ||
| title | No | Data Visualization | |
| request_params | No |