Put a data source on a dashboard
add_data_source_to_dashboardPut one data source on one of the account's dashboards, so widgets can be built on it. Use when: the user has just saved data with add_custom_data (when it is listed) and wants it on a dashboard — that call returns the sourceId to pass here — or when search_data_sources found the source they meant. Name the source ONE of three ways, in this order of preference: 'sourceId' when a previous call gave you one; 'connectionId' plus 'providerKey' exactly as search_data_sources returned them; or 'sourceName' as a last resort, which looks only among sources DashThis already holds and refuses rather than guessing between several. Returns: whether it was added, the source's id, and how many plan source slots it used. Rules: one source per call. Confirm with the user first — this changes a dashboard they may be sending to a client. A source already used on another dashboard costs no slot; one used nowhere claims one, and the call is refused rather than taking the account over its plan limit. Adding a source the dashboard already has is harmless. It does not build widgets, and it cannot connect a platform the user hasn't connected in DashThis. Then: say which source landed on which dashboard, and that the widgets are still theirs to add in DashThis.
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": {
"dashboardId": "<dashboardId>"
},
"name": "add_data_source_to_dashboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceId | No | The sourceId returned by search_data_sources, or by add_custom_data when it is listed. Use this whenever you have it — it is exact. | |
| sourceName | No | The source's name, exactly as search_data_sources returned it. Pass it alongside 'connectionId' and 'providerKey' — it becomes the name shown on the dashboard. With no ids at all it is instead used to search among sources DashThis already holds, and if more than one matches the call is refused with the candidates listed — put those to the user and never pick one yourself. | |
| dashboardId | Yes | The dashboard to add to — its GUID or the short id from its URL. Both come back from list_dashboards. | |
| providerKey | No | The providerKey from search_data_sources, exactly as returned. Pass with 'connectionId'. Never invent one — it is the platform's own identifier for the source. | |
| connectionId | No | The connectionId from search_data_sources. Pass with 'providerKey' to add a source the platform offers that DashThis has not set up yet. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| added | Yes | True when this call put the source on the dashboard, false when it was already there. | |
| summary | No | Read this first: the result in plain language, including any caveat you must repeat when you report it. The fields alongside carry the same facts as data. | |
| sourceId | Yes | The source's id in DashThis. Present whether it was already set up or set up by this call. | |
| slotsUsed | Yes | Plan source slots this consumed — 0 when the source was already in use on another dashboard, or already on this one. | |
| slotsRemaining | Yes | Slots left on the plan afterwards. Null when there was no count to make — the account has no plan limit, or the source was already on this dashboard and nothing was claimed. |