Skip to main content
Glama

export_report

Read-only

Direct the user to download a report file (CSV, PDF, or XML) from the web app's Reports page. This covers tax reports (capital gains, income, IRS forms, transactions) AND portfolio/holdings reports (inventory with per-currency balance/cost/market value, cost basis by account, balance variation, start-of-year holdings).

Report files are generated and downloaded in the web app, not delivered through MCP. Use this tool whenever a user asks to export, download, or save a report file — including holdings, portfolio, or balance exports — and give them the returned link. Choose inventory when the user asks generically for a portfolio or holdings data export.

For supported tax report figures, use get_tax_report. For current holdings and portfolio values, use get_portfolio. File-only report figures remain in this download flow.

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": {
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "export_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoFormat for a pack selection (packType). Omit when using `reports` — those carry their own per-report format.
toDateNoEnd of the report period, ISO 8601 (e.g. '2025-06-30').
contextYesWrite one short, abstract, third-person sentence about the task. Refer to the requester only as "the user". Refer to any selected customer, client profile, business, portfolio, account, or data source only as "the client". Never copy, abbreviate, initialize, quote, or paraphrase a user or client name from the conversation, request, or tool data. Never put a name, initials, label, possessive name, business name, email, account name, or identifier before or after "the user" or "the client". Rewrite every named reference to exactly "the user" or "the client". For example, rewrite "User wants to know the inventory method for the client Alex R" as "The user wants to know the inventory method for the client." Do not include wallet names, wallet addresses, transaction hashes, amounts, balances, prices, dates, tax identifiers, account identifiers, or other personal or financial values. Use only generic data categories such as "transactions", "accounts", "wallets", or "tax settings". If a safe abstract summary is not possible, write exactly "the request contains sensitive details".
reportsNoIndividual reports to download, each with its own format — you can mix formats in one call (e.g. capital-gains as csv and irs-8949 as pdf). Use EITHER this OR packType, never both.
fromDateNoStart of the report period, ISO 8601 (e.g. '2024-07-01').
packTypeNoA named report pack (e.g. 'Self', 'Accountant', 'MyGov', 'IRS8949', 'TurboTax'). Offer a pack when the user asks loosely ('reports for my accountant' → Accountant). Use EITHER this OR reports, never both.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
financialYearNoEnd calendar year of a standard financial year, taken from a get_filter_options preset's `year`. Include it whenever the period is a standard FY so IRS reports surface; omit only for an explicit custom range.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, openWorldHint false), and the description adds a genuinely non-obvious trait: files are generated in the web app and not delivered through MCP, so the agent must hand the user the returned link. What it does not say is whether the link expires, whether generation is synchronous, or what the response shape looks like.

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 critical constraint (download happens in the web app, not via MCP) is front-loaded and the sibling routing is grouped in one paragraph. It is on the long side and partly re-enumerates report categories that the schema enum already lists, which is the only waste.

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?

For an 8-parameter tool with full schema coverage and no output schema, the description supplies exactly what the schema cannot: that the deliverable is a link shown to the user, how to disambiguate portfolio-vs-tax requests, and when the sibling read tools are the better choice.

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 the enum descriptions already explain reportType ids, the format-vs-pack interaction, and the financialYear preset. The description restates the reports/packType mutual exclusion and the 'inventory for generic holdings' rule, which adds little beyond the schema, so the baseline of 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?

The first sentence gives a specific verb and resource (direct the user to download a report file) plus supported formats, and it names the exact report families covered (tax and portfolio/holdings). It also explicitly separates itself from get_tax_report and get_portfolio, so an agent can pick correctly without opening a schema.

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?

It states the triggering user intents ('export, download, or save a report file'), covers the ambiguous holdings/portfolio case with a concrete tie-breaker ('choose inventory when the user asks generically'), and routes numeric lookups to get_tax_report and get_portfolio. The either/or constraint between reports and packType is called out twice.

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