Skip to main content
Glama

Generate Report

generate_report
Read-onlyIdempotent

Generate the data for any report over a date range - the same numbers the dashboard shows. The report selector is exactly one of report_id (a saved or custom report identifier) and template_key (a built-in template such as pnl or product_performance). Dates default to the report's own default timeframe ending today; narrower ranges reduce truncation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNoEnd of the report date range as YYYY-MM-DD, resolved in the tenant's timezone. Defaults to today in the tenant's timezone.
report_idNoThe internal MerchantFlow id of a saved or custom report from list_reports. Pass exactly one of report_id or template_key.
start_dateNoStart of the report date range as YYYY-MM-DD, resolved in the tenant's timezone. Defaults to the report's own default timeframe measured back from end_date.
template_keyNoThe key of a built-in report template (e.g. pnl, product_performance) from list_reports. Pass exactly one of report_id or template_key.
comparison_modeNoHow to compute the comparison_rows: "none" for no comparison, "previous_period" for the immediately preceding period of equal length, or "previous_year" for the same period one year earlier.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoOne row per period. Which metric keys appear depends on the report configuration.
_metaNo
reportNo
_messageNo
currencyNo
_truncatedNo
date_rangeNo
generated_atNoISO 8601.
pnl_statementNo
summary_tilesNo
_tenant_contextNo
comparison_rowsNoPresent only when a comparison_mode other than "none" was requested and produced rows.
expense_breakdownNo
marketing_campaignsNoTop 50 campaigns. Revenue and ROAS here are per campaign; there is no per-campaign profit.
marketing_platformsNo
product_performanceNoTop 50 products. Image URLs are stripped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful operational behavior beyond annotations: dates default to the report's own timeframe ending today, and narrower ranges reduce truncation. No contradiction with the annotations.

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

Conciseness5/5

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

Two front-loaded sentences with no filler. The core purpose appears first, followed by the essential selector and date behavior. Every sentence earns its place.

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?

With a fully described 5-parameter schema, an output schema, and annotations covering read-only/idempotent behavior, the description is complete enough to call the tool correctly. It adds the remaining non-obvious context: report scope, date defaults, and truncation behavior.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful context beyond the schema: 'exactly one of report_id and template_key' clarifies mutually exclusive selection, and 'narrower ranges reduce truncation' gives practical date-range guidance not present in the schema.

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?

The description states a specific action ('Generate the data for any report over a date range') and a clear resource ('any report'), with the dashboard comparison anchoring its meaning. It differentiates itself from the many metric-specific get_* siblings by covering saved/custom reports and built-in templates.

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

Usage Guidelines3/5

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

The description implies this is the general report-data tool ('the same numbers the dashboard shows') and explains the report selector, but it does not explicitly say when to prefer generate_report over the get_*/run_* siblings or when not to use it. Usage context is present but left to inference.

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