Skip to main content
Glama

generate_report

Generate a written report from a report template and your data sources, in the background. Uses AI credits. Returns a job id: poll get_analysis_status until it completes; the result names the new report, which get_report returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionNoOptional focus for the report, e.g. "paid acquisition in Q3".
template_idYesID or slug of a report template (see the template list in the web app).
data_source_idsNoData sources to report on, most important first (from list_data_sources). Omit to use every active source in the organization, up to 5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
statusYes"queued" once generation has started.
web_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / properties / data_source_ids
      Added value: +{
      +  "description": "Data sources to report on, most important first (from list_data_sources). Omit to use every active source in the organization, up to 5.",
      +  "items": {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
    • removedInput schema / properties / output_format
      Removed value: -{
      -  "default": "pdf",
      -  "description": "Output format. Must match one of ``GeneratedReport.OUTPUT_FORMATS``.",
      -  "enum": [
      -    "json",
      -    "pdf",
      -    "html",
      -    "excel",
      -    "csv"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / question
      Added value: +{
      +  "description": "Optional focus for the report, e.g. \"paid acquisition in Q3\".",
      +  "maxLength": 2000,
      +  "type": "string"
      +}
    • changedInput schema / properties / template_id / description
      Previous value: -"Optional registry ID of the marketplace template to render. If omitted, an empty report shell is created and you can attach a template later from the web app."New value: +"ID or slug of a report template (see the template list in the web app)."
    • addedInput schema / properties / template_id / minLength
      Added value: +2
    • removedInput schema / properties / title
      Removed value: -{
      -  "description": "Display title for the generated report.",
      -  "maxLength": 200,
      -  "minLength": 2,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "title"
      -]New value: +[
      +  "template_id"
      +]
    • addedOutput schema / properties / job_id
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / report_id
      Removed value: -{
      -  "format": "uuid",
      -  "type": "string"
      -}
    • changedOutput schema / properties / status / description
      Previous value: -"Initial status, normally \"pending\". Poll get_report for progress."New value: +"\"queued\" once generation has started."
    • changedOutput schema / required
      Previous value: -[
      -  "report_id",
      -  "status",
      -  "web_url"
      -]New value: +[
      +  "job_id",
      +  "status"
      +]
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare non-read-only, non-idempotent, closed-world, non-destructive, but the description adds the value the annotations cannot: it runs in the background, consumes AI credits, and returns a job id rather than the finished report. Only missing aspect is what happens on timeout/failure of the job.

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?

Three sentences, tightly front-loaded: what it does, the cost and async model, then the exact follow-up call sequence. No filler.

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?

Even though an output schema exists (so return values are technically covered), the description usefully tells the agent the return is a job id plus the polling path, which is critical for correct orchestration. Nothing needed to invoke or chain the tool is missing.

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 description coverage is 100% and already documents question, template_id, and data_source_ids (including the max-5 and omit-for-all defaults). The description adds no parameter-level meaning beyond what the schema provides, 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+resource ('Generate a written report') and immediately qualifies scope with the template + data-source inputs. The background/async nature further distinguishes it from synchronous siblings like run_analysis or get_report.

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 the full workflow: poll get_analysis_status until completion, then get_report names the new report. It names the downstream alternatives, though it does not contrast against run_analysis when a report is not the desired output, so when-not guidance is partial.

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