Skip to main content
Glama

Preview a Porter report (renders with data — slow)

preview_report
Read-only

Render the report against real data and return the preview plus diagnostics.

Right after an upload you usually do NOT need this: edit_report and publish_report_spec already return the report's diagnostics and a preview_url from the audit they ran against real data. On a report that has not changed since, this returns that same audit in about a second (cached: true, with audited_at) instead of rendering again. Pass refresh=True only when the DATA may have changed since then (an account was reconnected, a sync finished) — it forces a full render, which is SLOW (5-30s or more). A cached audit with a license or authorization refusal (account_not_accessible, license_*, reauth_required…) is rendered again on its own: those are fixed outside the report (a role, a slot, a reconnect), so the stored audit cannot show the fix.

Use it to validate the render or debug broken charts — not for routine listing or metadata reads (use get_report for those). Because the render already produces the logs, this ABSORBS the diagnostics: one call returns a preview_url (an openable link to the rendered preview — give it to the user), rendered_at, diagnostics (each a broken or empty chart with severity, optional page_id/chart_id, a message and a hint on how to fix it), cached and, when known, audited_at (when the audit behind the answer ran). A page_id always renders that page.

ready is true only when a preview exists AND no chart failed; preview_available says whether the image exists at all. When data_status is query_budget_exhausted the charts hit the report's hourly query budget: do not edit or re-upload, retry after retry_after_seconds.

page_id scopes the diagnostics only. The preview image is ALWAYS the report's default first page (captured at build time), whatever page you ask for: with page_id the result says so in page_note and gives a page_url that opens the requested page — share that link for it.

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": {
      "report_id": "<report_id>"
    },
    "name": "preview_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
page_idNo
refreshNo
report_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/openWorldHint/destructiveHint=false, and the description adds substantial context beyond them: the ~1s cached path with cached/audited_at, the 5-30s slow full render, the automatic re-render when a stored audit holds a license or auth refusal, and the query-budget behavior with retry_after_seconds. The non-obvious gotcha that page_id scopes diagnostics only while the preview image is always the default first page is exactly the kind of disclosure that prevents a wrong call.

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?

Well front-loaded: purpose, then the when-not-to-use routing, then the refresh cost, then output fields. It is long, and some of the return-field prose (preview_url, rendered_at, diagnostics shape) restates what an existing output schema already conveys, and the "validate the render or debug broken charts" line partly repeats the opening.

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

Completeness5/5

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

For a slow, cached, visually-oriented tool with real cost and auth edge cases, nothing an agent needs is missing: cost model, caching semantics, failure modes, budget exhaustion, and the page-scoping caveat are all present. Return-value explanation is partly redundant given the output schema, but that is verbosity rather than incompleteness.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the parameter burden; it fully explains refresh's cost trade-off and page_id's dual effect on diagnostics versus the image, including the page_note/page_url consequence. report_id is never discussed and page_id's accepted values are unspecified, which keeps this short of a 5.

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?

"Render the report against real data and return the preview plus diagnostics" gives a specific verb, resource, and output, and the same paragraph distinguishes it from edit_report, publish_report_spec, and get_report. An agent can tell exactly what this does and what it is not for without opening the schema.

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

Usage Guidelines5/5

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

Explicitly states when NOT to use it ("Right after an upload you usually do NOT need this", "not for routine listing or metadata reads (use get_report for those)") and names the alternatives. It also gives the precise condition for the expensive path: pass refresh=True only when the data may have changed, such as a reconnect or a finished sync.

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.

Resources