Tools Reference
Data & Analytics
Four tools for parsing, querying, analyzing, and visualizing data. The most powerful category for data-focused agents.
csv_parse Standard
Parse CSV (Comma-Separated Values) data into a structured array of objects.
TypeScript
tools.csvParseParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| csvData | string | ✓ | Raw CSV string (with header row) |
| delimiter | string | — | Column delimiter (default: ,) |
Returns
TypeScript
{
headers: ["name", "revenue", "region"],
rows: [
{ name: "Alpha", revenue: "50000", region: "US" },
{ name: "Beta", revenue: "75000", region: "EU" },
],
rowCount: 2,
columnCount: 3
}data_query Standard
Query datasets using operations like filtering, sorting, grouping, and aggregation.
TypeScript
tools.dataQueryParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | object[] | ✓ | Array of data objects to query |
| operation | string | ✓ | One of: filter, sort, group, aggregate, select, limit |
| params | object | ✓ | Operation-specific parameters (see below) |
Operations
- filter — Filter rows by a condition:
{ field, operator, value } - sort — Sort by field:
{ field, direction } - group — Group by field:
{ field } - aggregate — Aggregate values:
{ field, function }(sum, avg, min, max, count) - select — Select specific fields:
{ fields: string[] } - limit — Limit results:
{ count }
statistics Standard
Compute statistical metrics on numeric data arrays.
TypeScript
tools.statisticsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | number[] | ✓ | Array of numeric values |
| metrics | string[] | — | Which metrics to compute (default: all) |
Available Metrics
meanmedianmodeminmaxrangesumcountvariancestddevpercentile25percentile75skewnesskurtosis
Returns
TypeScript
{
mean: 51666.67,
median: 50000,
mode: null,
min: 30000,
max: 75000,
range: 45000,
sum: 155000,
count: 3,
variance: 338888888.89,
stddev: 18409.73,
percentile25: 40000,
percentile75: 62500,
skewness: 0.12,
kurtosis: -1.5
}generate_chart Standard
Generate data visualizations using the Vega-Lite specification format.
TypeScript
tools.generateChartParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| chartType | string | ✓ | bar, line, pie, scatter, or area |
| data | object[] | ✓ | Array of data points |
| xField | string | ✓ | Data field for x-axis |
| yField | string | ✓ | Data field for y-axis |
| title | string | — | Chart title |
Chart Types
- bar — Categorical comparisons (revenue by region)
- line — Trends over time (monthly sales)
- pie — Proportional distribution (market share)
- scatter — Correlations (price vs. quality)
- area — Cumulative trends (growth over time)
Returns
TypeScript
{
spec: { /* Vega-Lite JSON specification */ },
imageUrl: "data:image/png;base64,..."
}Example: Full Data Pipeline
A typical data agent chains these four tools:
csv_parse→ Parse uploaded CSVdata_query→ Filter and aggregatestatistics→ Compute key metricsgenerate_chart→ Visualize results