The Save Chart Dataset tool saves a generated dataset for a chart into the database, specifically in the meta JSON field of a message. This tool allows agents to store chart data in a structured format, which can then be used for visualization purposes. The tool requires both the dataset and the type of chart (e.g., pie, column, line) to be specified.Documentation Index
Fetch the complete documentation index at: https://rag-docs.peakfs.io/llms.txt
Use this file to discover all available pages before exploring further.
Arguments
dataset (string): The dataset to save, formatted as a JSON string. The format varies depending on the chartType:- Pie Chart:
[{name: 'name', value: value}, {name: 'name', value: value}] - Column Chart:
[{name: 'name', value: name}, {name: 'name', value: name}] - Line Chart:
[{ date: 'YYYY-MM-DD', value: value },{ date: 'YYYY-MM-DD', value: value }]
- Pie Chart:
chartType (string): The type of chart. Accepted values are pie, column-vertical, column-horizontal, and line.
Example Configuration
Example Usage
- User Query: “Generate a pie chart for my recent expenses.”
- Agent Invocation1: The agent calls
get-user-transactionsto get the transactions data. - Agent Invocation2: The agent calls
save_chart_datasetwith the following parameters:- dataset:
[{ "name": "Food", "value": 300 }, { "name": "Transport", "value": 150 }] - chartType: pie
- dataset:
- Response: The tool saves the chart dataset and returns a success message.