Make a chart self-updating: attach a source URL, fetched on schedule
set_data_sourceAttach a public CSV or JSON URL to a chart as its data source. The chart fetches it on a schedule (hourly, daily, or weekly), replaces rows, and republishes automatically.
Instructions
The chart refetches this URL (CSV or JSON) hourly/daily/weekly, replaces its rows, and republishes itself if published — refreshes are free, updates are never metered. Columns stay as defined on the asset: CSV headers / JSON object keys match column ids or labels case-insensitively, with spaces, underscores and hyphens interchangeable (births_per_woman matches a column labeled 'Births per woman'). Fetches once immediately and returns that outcome — check fetch.ok and fix fetch.error before moving on. get_asset shows dataSource + dataSourceState when a source is attached. Clear with clear_data_source.
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": {
"id": "<id>",
"url": "<url>"
},
"name": "set_data_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | Yes | Public http(s) URL serving CSV, a JSON array of objects, or {rows:[[...]]} | |
| format | No | ||
| refresh | No | Default daily |