Skip to main content
Glama

Preview a report

preview_report
Read-only

Run a report the user asked for, such as "invoiced per month this year against last year" or "most profitable jobs this financial year by manager", and answer each block's figures. It saves nothing: show the user what it found, adjust, then save_report. A report is blocks, each one figure, chart or table. A block reads sql (one SELECT, as run_sql runs it: the most flexible, any calculation, across sources), a resource (describe_resources; a sum or count by up to two columns, as summarize_records reads it) or a question (discover_questions; the curated reads, such as profit per job). Each block answers its layout: width, its share of the row, and note, when it has one. A block that cannot run says why in place of figures.

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

Input Schema

NameRequiredDescriptionDefault
reportYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description reinforces this usefully with "It saves nothing" and adds behavior the annotations do not cover, namely that a failing block reports why in place of figures. Missing only operational context such as cost or latency for sql-backed blocks.

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?

Front-loaded with purpose and the non-persistence constraint, then the block model, then layout. Dense but nearly every clause carries routing information; the sentence about width and note largely restates the schema and could be cut.

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?

For a tool whose single parameter nests a full report structure, the description supplies the mental model (blocks, sources, one-of constraint) and error behavior. It does not say what the preview returns overall or how a preview relates to the later save_report payload, which would help close the workflow loop.

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?

The top-level schema field carries no description, but every nested block field is documented in detail, so the schema does most of the work. The description adds real meaning by framing sql/resource/question as mutually exclusive source modes and tying each to the sibling tool that defines its semantics, but it does not explain individual fields such as compare, values or units.

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 and resource ("Run a report the user asked for") and immediately draws the line against save_report ("It saves nothing"). It also defines what a report is (blocks, each one figure, chart or table), so an agent can distinguish it from run_report or list_reports without opening a 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?

Gives an explicit workflow (preview, show the user, adjust, then save with save_report) and routes each block type to a concrete alternative: sql as run_sql runs it, resource via describe_resources as summarize_records reads it, question via discover_questions. Exclusions are implicit but the routing is unambiguous.

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