> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Financial reports

> Start with get_financial_report, then use specialized P&L, ledger, export, and tax tools.

Agents should start with **`get_financial_report`**. It is always-load in both platform and business mode. Specialized tools exist when the response shape differs (trends, comparisons, line items, general ledger, data-sync validation).

Amounts are integer cents. Convert before presenting.

For HTTP payload shapes and embedded reporting, see [Accounting reports](/guides/reporting).

## Sequence

<Steps>
  <Step title="Set business context if needed">
    In platform mode, call `set_active_business` first. See [Platform session](/insights/mcp-server/platform-session).
  </Step>

  <Step title="Fetch the report">
    Call `get_financial_report` with `report_type`. Use `start_date` and `end_date` for P\&L and cash flow. Use `effective_date` for balance sheet.
  </Step>

  <Step title="Use a specialized tool only when the shape differs">
    Month-range trends use `get_profit_and_loss_summaries` (this is **not** renamed to “trends”). Side-by-side periods use `compare_profit_and_loss`. File downloads use `export_financial_report`.
  </Step>
</Steps>

## `get_financial_report`

Always-load. Group: `reporting`. Modes: platform and business.

`report_type` values: `profit_and_loss`, `balance_sheet`, `cash_flow`, `trial_balance`, `ap_aging`, `ar_aging`.

The tool returns a shared envelope: `report_type`, `fetched_at`, `amounts_unit: cents`, and `report` (the Layer payload).

| `report_type`     | Dates                              | HTTP                               | Tag filter |
| ----------------- | ---------------------------------- | ---------------------------------- | ---------- |
| `profit_and_loss` | `start_date` + `end_date` required | `GET …/reports/profit-and-loss`    | Yes        |
| `balance_sheet`   | `effective_date` required          | `GET …/reports/balance-sheet`      | Yes        |
| `cash_flow`       | `start_date` + `end_date` required | `GET …/reports/cashflow-statement` | No         |
| `trial_balance`   | dates optional                     | `GET …/ledger/balances`            | No         |
| `ap_aging`        | —                                  | `GET …/reports/unified/ap-aging`   | Yes        |
| `ar_aging`        | —                                  | `GET …/invoices/ar-aging`          | No         |

Tag filters are only sent when Layer applies them **before aggregation** (P\&L, balance sheet, AP aging). Do not invent tag filters for cash flow, AR aging, trial balance, tax, or Schedule C.

Optional `reporting_basis`: `ACCRUAL` or `CASH`. P\&L also accepts `structure`.

## Specialized report tools

Keep these when you need their distinct shapes:

* `get_profit_and_loss_summaries` — month-range P\&L summaries for trends, charts, and performance comparisons (`GET …/profit-and-loss-summaries`). Search phrases: reports, P\&L, profit and loss, trends.
* `compare_profit_and_loss` — `POST …/profit-and-loss-comparison`
* `get_profit_and_loss_details` — `GET …/profit-and-loss-details`
* `get_profit_and_loss_line_items` — `GET …/profit-and-loss/lines`
* `get_balance_sheet` — same resource as unified `report_type: balance_sheet`
* `get_general_ledger` — `GET …/ledger/entries`
* `get_data_sync_validation` — backfill / data-sync checks
* `get_chart_of_accounts` — nested chart; always-load on business (`GET …/ledger/chart`)

## Exports

`export_financial_report` returns a presigned download URL for `csv` or `xlsx`.

| Report                   | Formats            |
| ------------------------ | ------------------ |
| P\&L, balance sheet      | `csv` or `xlsx`    |
| cash flow, trial balance | **csv only**       |
| AP aging                 | **xlsx only**      |
| AR aging                 | **no file export** |

Async billing jobs are platform-only: `create_billing_report_export` then `list_exports` / `get_export`. See [Platform session](/insights/mcp-server/platform-session).

## Tax (reporting group)

Tax tools live in `reporting`. Prefer [Tax](/insights/mcp-server/tax) for the full sequence.

* `get_tax_estimate` — `view`: `overview` | `summary` | `details` | `payments`. No tag filter.
* `get_tax_checklist`, `get_tax_profile`, `update_tax_profile` (business write)
* `get_schedule_c_report` — `GET …/reports/tax/schedule-c`
* `create_tax_packet`, `list_tax_packets`
* `export_tax_documents` — `TAX_PACKET` | `SCHEDULE_C` | `PAYMENT_HISTORY`
