Run a custom view spec on the user's data without saving it
preview_viewRuns a view spec against the user's real data and returns what it would show (columns, rows up to 200, totals, KPIs) WITHOUT saving anything. Use it to check a spec before manage_view create, or to answer a one-off question as a table. The spec is validated exactly as a save would be: a bad source, field, filter or chart type comes back as invalid_arguments naming the part to fix. Read list_view_sources first for what a spec may contain.
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": {
"spec": "<spec>"
},
"name": "preview_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | A view spec: the JSON object list_view_sources describes ({"v":1,"source":...,"columns":[...],"render":{...}}). Only catalog keys, no expressions or SQL. A JSON string of the same object is accepted too. | |
| range | No | The period to run it over, for views whose source has one and whose spec follows the dashboard: 1m (default), 3m, ytd, 1y or all. A spec that fixes its own range keeps it. | |
| profile | No | Which portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. "Trading"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | The spec as the app understood it (defaults filled in). Pass this to manage_view to save exactly what was previewed. | |
| as_of | No | When it was computed, epoch ms. | |
| error | No | Present ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted, rate_limited, limit_reached, view_unavailable. No data fields come with it; read `message` to the user rather than retrying the same call. | |
| range | No | ||
| result | No | ||
| message | No | Plain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user. | |
| profile | No | The portfolio these figures belong to (absent on list_profiles). | |
| next_step | No | What the user should do about data_status. | |
| source_url | No | Link to the page in the WhereItGoes app that shows this data. | |
| data_status | No | Present only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean "no data", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final. | |
| upgrade_url | No | Where the user can upgrade, on an upgrade_required refusal. | |
| stock_assets | No | Present when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto. |