> ## 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.

# Platform session

> Set the active business, onboard businesses, and run platform analytics and billing exports.

Platform mode uses `POST`/`GET`/`DELETE …/mcp`. Default groups are `core` and `reporting`. The agent **must** call `set_active_business` with a Layer business UUID before business-scoped tools.

Platform cannot mutate business accounting data (no categorize, imports, voids, or journal entries). It can create and update businesses, read many shared resources, and run platform analytics.

Always-load on platform: `set_active_business`, `get_all_businesses`, `get_financial_report`, `get_profitability_report`.

See [Authentication](/insights/mcp-server/business-scoped-access) for the `/mcp` URL.

## Sequence: inspect a customer

<Steps>
  <Step title="Find the business">
    `get_all_businesses`, or `get_business` when you already have the UUID.
  </Step>

  <Step title="Pin the session">
    `set_active_business` (always-load).
  </Step>

  <Step title="Read reports or activity">
    `get_financial_report` for P\&L, balance sheet, cash flow, trial balance, and aging. `get_profitability_report` buckets businesses by net income (platform analytics only).
  </Step>
</Steps>

## Onboarding

* `create_business` — `POST /v1/businesses`. `external_id` is the idempotency key. Does not mutate an existing ledger.
* `update_business` — `PUT /v1/businesses/{businessId}`
* `get_business` — platform and business
* `get_all_businesses` — always-load composite

REST: [Business onboarding](/guides/business-onboarding).

## Analytics and bookkeeping status

* `get_profitability_report` — always-load. Platform analytics; amounts in cents. Search: profitability.
* `get_platform_activity_summary` — `GET /v2/activity`
* `list_bookkeeping_businesses` — `GET /v1/reports/bookkeeping`

## Billing exports

<Steps>
  <Step title="Create the job">
    `create_billing_report_export` — `POST /v1/billing/reports`
  </Step>

  <Step title="Poll">
    `list_exports` / `get_export` — `GET /v1/exports`
  </Step>
</Steps>

Search phrases: set active business, profitability, activity summary, billing export.
