Skip to main content
Glama

Run a custom view spec on the user's data without saving it

preview_view
Read-onlyIdempotent

Runs 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

NameRequiredDescriptionDefault
specYesA 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.
rangeNoThe 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.
profileNoWhich 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

NameRequiredDescriptionDefault
specNoThe spec as the app understood it (defaults filled in). Pass this to manage_view to save exactly what was previewed.
as_ofNoWhen it was computed, epoch ms.
errorNoPresent 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.
rangeNo
resultNo
messageNoPlain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user.
profileNoThe portfolio these figures belong to (absent on list_profiles).
next_stepNoWhat the user should do about data_status.
source_urlNoLink to the page in the WhereItGoes app that shows this data.
data_statusNoPresent 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_urlNoWhere the user can upgrade, on an upgrade_required refusal.
stock_assetsNoPresent when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds real substance beyond them: a 200-row cap, dry-run semantics, and the validation contract (a bad source/field/filter/chart type returns invalid_arguments naming the part to fix). It does not mention rate limits or pagination beyond the row cap, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the dry-run purpose followed by use cases, error behavior, and prerequisite. Every clause carries information; no filler or restatement of the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and a fully described input schema, the description only needs to cover intent, the no-save guarantee, validation failure modes, and the row cap — all of which it does. Only minor gaps like output pagination beyond 200 rows remain, and those are largely the output schema's job.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all three parameters (spec, range, profile) are already documented with formats, enum values, and defaults. The description adds no parameter-level detail beyond pointing to list_view_sources for spec shape, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (runs a view spec against real data and returns what it would show) plus the key distinguishing property: nothing is saved. It also enumerates the returned surface (columns, rows, totals, KPIs), which separates it from manage_view at a glance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use cases ('check a spec before manage_view create', 'answer a one-off question as a table') and a prerequisite ('Read list_view_sources first'). It never states a when-not, but the dry-run framing implicitly excludes the save path handled by manage_view.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.