Data Visualization
Generate customizable bar charts from data with various styling options
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/bar-chart-generator' \
-H 'Content-Type: application/json' \
-d '{"chartData":"JSON: [{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nor text:\nJan:100\nFeb:150\nMar:120","chartTitle":"Enter chart title...","chartType":"vertical","barColor":"#3b82f6","backgroundColor":"#ffffff","gridColor":"#e0e0e0","barWidth":"50","chartHeight":"400","maxValue":0,"minValue":"0","xAxisLabel":"Category","yAxisLabel":"Value","showGrid":true,"showValues":true,"showLegend":true}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/bar-chart-generator| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| chartData | textarea | Sí | Data for the chart. Can be JSON array or simple label:value pairs |
| chartTitle | text | No | Title that will be displayed above the chart |
| chartType | select | No | — |
| barColor | color | No | Color for the bars in the chart |
| backgroundColor | color | No | Background color for the chart container |
| gridColor | color | No | Color for the grid lines |
| barWidth | number | No | Width of each bar in pixels (auto-adjusts if too large) |
| chartHeight | number | No | Height of the chart in pixels |
| maxValue | number | No | Maximum value for Y-axis (leave empty for auto-scale) |
| minValue | number | No | Minimum value for Y-axis |
| xAxisLabel | text | No | Label for the X-axis |
| yAxisLabel | text | No | Label for the Y-axis |
| showGrid | checkbox | No | Display horizontal grid lines for better readability |
| showValues | checkbox | No | Display the actual values on top of each bar |
| showLegend | checkbox | No | Display a legend below the chart |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-bar-chart-generator": {
"name": "bar-chart-generator",
"description": "Generate customizable bar charts from data with various styling options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=bar-chart-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bar-chart-generator",
"arguments": {
"chartData": "JSON: [{"label": "Jan", "value": 100},\n{"label": "Feb", "value": 150},\n{"label": "Mar", "value": 120}]\n\nor text:\nJan:100\nFeb:150\nMar:120",
"chartTitle": "Enter chart title...",
"chartType": "vertical",
"barColor": "#3b82f6",
"backgroundColor": "#ffffff",
"gridColor": "#e0e0e0",
"barWidth": "50",
"chartHeight": "400",
"maxValue": 0,
"minValue": "0",
"xAxisLabel": "Category",
"yAxisLabel": "Value",
"showGrid": true,
"showValues": true,
"showLegend": true
}
}
}¿Dudas o problemas? Contacta con [email protected]