generate_pie_chart
Create a pie chart from a CSV dataset to visualize category composition. Sum a numeric column per category and output the chart path and data.
Instructions
Generate a pie chart showing the composition of a categorical column.
Args:
dataset: Name of the dataset.
category_column: Categorical column whose values form the slices.
value_column: Numeric column to sum per category.
title: Chart title.
filename: Output filename (auto-generated if empty).
Returns:
A JSON str with {"chart_path":"...","chart_data":"..."}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset": "<dataset>",
"category_column": "<category_column>",
"value_column": "<value_column>",
"title": "<title>"
},
"name": "generate_pie_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| dataset | Yes | ||
| filename | No | ||
| value_column | Yes | ||
| category_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |