Skip to main content
Glama

Export report

export_report
Read-only

Save a report to the business's Files as a PDF or a CSV, drawn from the same numbers the app shows: profit-and-loss, cash-flow or a statement for start to end, balance-sheet, trial-balance or overdue-invoices (what each customer owes by age, as stub-web's Overdue Invoices shows it) as at end, bank-transactions (one account with bankaccountid, else all) for start to end, or the chart-of-accounts (no dates). Answers the new file's id and name: cite it as a file tag so the user can open and download it. Each call saves a new copy, so call it once per request. The file is kept, not imported into the books. A missing or another business's contact is refused with reason report-contact-not-found.

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>",
      "format": "<format>"
    },
    "name": "export_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNostatement only: the customer's or supplier's id, from list_clients or list_suppliers.
endNoLast day, YYYY-MM-DD; the as-at date for balance-sheet, trial-balance and overdue-invoices. Needed for all but chart-of-accounts.
kindNostatement only: customer or supplier.
startNoFirst day, YYYY-MM-DD. Needed for profit-and-loss, cash-flow, statement and bank-transactions.
formatYespdf or csv. A csv opens in Excel or Google Sheets.
reportYesprofit-and-loss, balance-sheet, trial-balance, cash-flow, chart-of-accounts, statement (one customer's or supplier's account), overdue-invoices (each customer's overdue money by age; aged-debtors still works) or bank-transactions.
bankaccountidNobank-transactions only: one bank account's id, from list_bank_accounts. Omit for every account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / end / description
      Previous value: -"Last day, YYYY-MM-DD; the as-at date for balance-sheet, trial-balance and aged-debtors. Needed for all but chart-of-accounts."New value: +"Last day, YYYY-MM-DD; the as-at date for balance-sheet, trial-balance and overdue-invoices. Needed for all but chart-of-accounts."
    • changedInput schema / properties / report / description
      Previous value: -"profit-and-loss, balance-sheet, trial-balance, cash-flow, chart-of-accounts, statement (one customer's or supplier's account), aged-debtors or bank-transactions."New value: +"profit-and-loss, balance-sheet, trial-balance, cash-flow, chart-of-accounts, statement (one customer's or supplier's account), overdue-invoices (each customer's overdue money by age; aged-debtors still works) or bank-transactions."
  2. Changed3 schema fields changed
    • changedInput schema / properties / end / description
      Previous value: -"Last day, YYYY-MM-DD; the as-at date for balance-sheet and aged-debtors. Always needed."New value: +"Last day, YYYY-MM-DD; the as-at date for balance-sheet, trial-balance and aged-debtors. Needed for all but chart-of-accounts."
    • changedInput schema / properties / report / description
      Previous value: -"profit-and-loss, balance-sheet, statement (one customer's or supplier's account), aged-debtors or bank-transactions."New value: +"profit-and-loss, balance-sheet, trial-balance, cash-flow, chart-of-accounts, statement (one customer's or supplier's account), aged-debtors or bank-transactions."
    • changedInput schema / properties / start / description
      Previous value: -"First day, YYYY-MM-DD. Needed for profit-and-loss, statement and bank-transactions."New value: +"First day, YYYY-MM-DD. Needed for profit-and-loss, cash-flow, statement and bank-transactions."
  3. Added

TDQS

A3.8/5.0
Behavior1/5

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

The annotations declare readOnlyHint=true, yet the description states the tool saves a new file to the business's Files on every call and that "The file is kept." Creating and retaining a persistent artifact in the environment is a side effect, which is inconsistent with a read-only hint. The description does add useful detail (duplicate copies per call, error code report-contact-not-found, files not imported into the books), but the core read/write signal conflicts with the annotation.

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?

The action and output format are front-loaded, and the report catalogue is packed into a dense but parseable enumeration. A few phrases are redundant for an agent ("cite it as a file tag so the user can open and download it") and the per-report date rules repeat the schema, but almost every sentence carries operational information.

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 no output schema, the description still explains the return values (the new file's id and name) and how to present them, covers the error case (report-contact-not-found), and states the persistence/duplication behavior. For a seven-parameter export tool this is close to complete; the only gap is guidance on choosing this over other export tools.

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 cross-parameter logic the schema only states per-field: which report requires which dates, that bankaccountid applies only to bank-transactions and defaults to all accounts, and the aged-debtors alias for overdue-invoices. That mapping of report type to required parameters gives the agent something the individual field descriptions do not assemble on their own.

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?

Opens with a specific verb and destination ("Save a report to the business's Files as a PDF or a CSV") and then enumerates exactly which reports are available, including what each one covers ("overdue-invoices (what each customer owes by age)"). An agent can tell this apart from document/PDF export siblings and from evaluation siblings without opening the schema.

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 clear per-report usage conditions: chart-of-accounts takes no dates, bank-transactions spans start to end and can be narrowed with bankaccountid, statement needs id and kind. It also explicitly says "call it once per request" because "Each call saves a new copy," which is real when-to-call guidance. It does not name an alternative tool (e.g. export_document_pdf) or state when not to use it, so it stops short of a 5.

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