Skip to main content
Glama

Run Saved Report

run_saved_report
Read-only

Run one of the organization's saved custom reports by its report_id and get its rows — THE tool for "run our Cost by Team report" or "what does the EC2 Usage Breakdown report show this month?". It loads the report's saved pivot settings (dimensions, granularity, service / account / cost-center filters and the exact integrations it was saved over) and runs them through the same code as run_cost_pivot, so it returns the same shape: rows largest-_total-first, columns, grandTotals, and requestedWindow / returnedWindow with a windowNote if the backend clamped the window — or, for a slow report, a { jobId, status } handle you collect with get_cost_pivot. A relative range ("Last 6 Months", "This Month", …) is recomputed from today, as the dashboard does when you open the report. Override the window with start_date / end_date and the row cap with limit. Only cost is returned: if the report also saves usage metrics they are listed in omittedMetrics, and the cost figures are unaffected. Each connection's saved cost settings apply, as in the dashboard. A report with a setting this tool can't express is refused with a sentence naming it. pivotArguments echoes the exact run_cost_pivot arguments used, so you can rerun or vary it there. Read-only. Example: { "report_id": "" }; { "report_id": "…", "start_date": "2026-10-01", "end_date": "2026-10-31", "limit": 20 } runs it for October only.

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": "run_saved_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return, applied after sorting by `_total` desc (default 100, max 500).
end_dateNoOverride the window end (needs start_date too). Defaults to today.
report_idYesThe saved report to run (report_id from list_saved_reports).
start_dateNoOverride the report's window start. Omit to use the report's own range, recomputed from today the way the dashboard does when you open it.
wait_secondsNoHow long to wait before handing back a job handle (default 20, max 22).
response_formatNoconcise = dimensions, `_total` and the last two time columns per row (default). detailed = every column.concise

Output Schema

NameRequiredDescriptionDefault
codeNoBackend error code, e.g. RESPONSE_TOO_LARGE.
noteNoWhat to do next.
rowsNoPivot rows, largest `_total` first. One key per dimension (named verbatim), one per time column, plus `_total`. On a `resource` pivot each row MAY also carry `_resource_id` and `_region` — both are optional and independent (a row can have both, either or neither), so check before using them; a missing `_resource_id` means the backend attributed none, not that the resource has none. The displayed `resource` value is sometimes the full ARN and sometimes a short name; it is the empty string "" for spend with no resource attribution (support, commitment fees, tax), and the literal "Others" for the backend collapse bucket — which can itself carry `_resource_id`/`_region`, so detect it by that string.
toolNoWhich tool truncated (only on a truncated result).
errorNoTrue on a backend error envelope.
jobIdNoThe pivot job. Pass to get_cost_pivot to pick it up later; expires 24h after creation.
statusNoqueued | running | succeeded | failed | cancelled | expired.
columnsNoTime-column labels (YYYY-MM monthly, YYYY-MM-DD weekly/daily). THE authority on the window served.
detailsNoBackend error details, when any.
messageNoHow to narrow the request (only on a truncated result).
nextStepNoHow to recover from the error in `code`.
rowsNoteNoPresent when rows were capped client-side.
expiresAtNoWhen the job is discarded (24h after creation).
totalRowsNoHow many rows matched before `limit` was applied.
truncatedNoPresent and true when the result exceeded the output-size budget and was WITHHELD. When you see this, no data fields are present — narrow the request as `message` says and call again.
dimensionsNoThe group-by actually applied, in order. Row keys use these names VERBATIM (a tag dimension is a literal "tag:<key>" key).
isLastPageNoAlways true — see `nextCursor`.
nextCursorNoAlways null: this backend returns every row in one response (paging is disabled).
windowNoteNoPresent only when the served window differs from the requested one — the backend clamps silently. Quote it.
emptyReasonNoWhy the pivot returned no rows.
grandTotalsNoOrg-wide totals per time column plus `_total`, independent of `limit`.
granularityNomonthly | weekly | daily.
pollAfterMsNoHow long to wait before calling get_cost_pivot (only on a not-yet-finished job).
reportNotesNoHow the saved settings were applied.
savedReportNoThe saved report that was run: `report_id`, `name`, `chart_type`.
approx_charsNoApproximate size of the withheld result (only on a truncated result).
returnedRowsNoHow many rows are in `rows`.
collapsedNoteNoPresent when the backend folded small rows into an `Others` bucket.
omittedMetricsNoSaved metrics this tool does not return (usage quantities). The cost figures are unaffected.
pivotArgumentsNoThe exact run_cost_pivot arguments the report mapped to — pass them to run_cost_pivot to reproduce or vary the run.
returnedWindowNoThe window actually served, derived from `columns`.
requestedWindowNoThe window asked for, `{start, end}`.

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 only say readOnlyHint/openWorldHint; the description adds substantially more — relative ranges recomputed from today, backend window clamping reported via windowNote, async job fallback, and that usage metrics are dropped with names surfaced in omittedMetrics. It also discloses a refusal path for settings the tool cannot express, though the exact error shape of that refusal is left vague.

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 the core action and the primary alternative, then progressively more detail. It is dense and long for a single paragraph, but nearly every clause carries behavioral information; only the closing example pair is mildly redundant with earlier prose.

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?

Six parameters, one required, an output schema, and known async behavior — the description covers the defaults, the override semantics, the return shape summary, the job-handle path, and the failure mode. An agent has everything needed to call it correctly on the first attempt.

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 already 100%, so baseline is 3; the description still adds value by explaining the interaction between report-saved defaults and the start_date/end_date override, and by giving a worked October example with limit. wait_seconds is left entirely to the schema, keeping it just 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?

Specific verb (run) plus resource (a saved custom report by report_id), immediately disambiguated from the sibling run_cost_pivot by noting it runs saved pivot settings through the same code path. The quoted example queries ("run our Cost by Team report") make the job-to-be-done unmistakable.

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 routes the agent: use this to execute a saved report, use run_cost_pivot to rerun or vary the echoed pivotArguments, and use get_cost_pivot to collect a { jobId, status } handle from a slow report. Also states override conditions for start_date/end_date and limit.

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