Preview a query
run_query_previewRun a query against a connected data source and return the first few rows, so you can confirm it works before putting it on a widget. Results are capped at 100 rows. If the query contains :customer_id you must also say which customer to preview as, using customerId or dashboardId.
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": {
"dataSourceId": "<dataSourceId>",
"query": "<query>"
},
"name": "run_query_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows to return. Defaults to 25. | |
| query | Yes | The SQL to run, or an A1 range for Google Sheets. Use :customer_id where a customer's own identifier belongs. | |
| customerId | No | The id of a customer (from list_customers) to run the query as. Required when the query uses :customer_id, unless dashboardId is given. | |
| dashboardId | No | A customer dashboard whose configured test customer should be used instead of a real customer. Only needed when the query uses :customer_id. | |
| dataSourceId | Yes | Data source id. |