Run report
get_report_dataFetch the full data for a report, including all regions and current choice values.
Reports in Azquo are Excel-based templates with named data regions. Each region contains row/column headings and a 2D array of values. Reports also support 'choices' — named parameters that filter the data (e.g. selecting a business unit, time period, etc).
Use it to see what a report shows a user - the figures as laid out in the report. For an ad-hoc question that no report answers, use query_aql; to see a report's formulas and layout rather than its data, use read_workbook. Find reports with list_reports (or list_database_sheets for one database).
Pass reportId as either a numeric ID or the report name. The database parameter is required. Any additional choices can be passed as key/value pairs. Choices are SAVED as this user's selections, as when they are picked in the report in a browser, so they also apply to the next run of any report using the same choice. A choice passed as "" clears the saved selection; leave a choice out to keep it as it is.
Example choices: { "Month": "Jan-24", "Department": "Sales" }
The result includes browserLink: a one-use link (10 minutes) that opens this report in the person's browser ALREADY SIGNED IN as this same user, with the choices just made, where they can change them. Give it to the person when they want to see the report; run again for a fresh one. Do not give any other address for the report - a plain address makes them sign in again, and they may land as another login of theirs, whose saved choices differ.
A library report (library: true in list_reports) runs read-only on its azquo_library database: pass that database's name; nothing is saved. open_in_browser shows it read-only. Its result carries libraryCopy: offer the person early to copy the database (copy_from_library) so it is theirs on admin.azquo.ai.
A choice value must be one of the options the report offers for it (choices in the result; run once without choices to see them): any other value is refused with invalid_choice, listing the options, and the saved choices are put back as they were. When a data region could not be filled the result STARTS with a warning and lists errors: the figures are blank or incomplete - do not present them as the report; tell the person what went wrong.
Errors report_not_found when the report does not exist or is not one this user may run, and report_render_failed when the report cannot be calculated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| choices | No | Optional choice parameters to filter report data, e.g. { Month: 'Jan-24' }. Saved as the user's selections; "" clears one | |
| business | No | Optional. The business this call is for, by name, e.g. "azquo" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names. | |
| database | Yes | Database name to run the report against - usually the database list_reports shows for it | |
| reportId | Yes | Report ID (number) or exact report name (string), from list_reports, e.g. 17 or "Monthly Sales" |