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

# Booking layers

> Manage and use booking layers, snapshots, and layer groups through the Fyvel MCP server.

# Booking layers

These tools help you find booking layers (`layer_uuid`), create snapshots, and manage layer groups for reports.

## Available tools

### Layers & snapshots

* `list_layers`
* `create_snapshot_layers`

### Layer groups

* `list_layer_groups`
* `create_layer_group`
* `delete_layer_group`

## Scope

Booking layers and groups belong to **companies** (`companyUuid`). Call `list_companies` to choose the matching `companyUuid`.

## List layers (`list_layers`)

1. `list_companies` → choose `companyUuid`
2. `list_layers` with an optional `companyUuid` filter
3. Note `layer_uuid`, `layer_type`, `is_default`, `is_forecast`, and `is_locked`

Typical source layers for snapshots are layers with `is_default: true` and `layer_type` not equal to `snapshot` (for example import, manual).

## Create a snapshot (`create_snapshot_layers`)

Creates **one new locked snapshot layer** per company that has aggregated values. Values from several source layers are merged per company.

**Parameters:**

* `companyUuids` — at least one company
* `sourceLayerUuids` — at least one source layer (UUIDs from `list_layers`)
* `periodRange` — optional `{ from: "YYYY-MM", to: "YYYY-MM" }`; omit it or pass `null` for every period that has data

**Example — all periods:**

```json theme={null}
{
  "companyUuids": ["<company-uuid>"],
  "sourceLayerUuids": ["<import-layer-uuid>", "<manual-layer-uuid>"]
}
```

**Example — period range:**

```json theme={null}
{
  "companyUuids": ["<company-uuid>"],
  "sourceLayerUuids": ["<import-layer-uuid>"],
  "periodRange": { "from": "2025-01", "to": "2025-12" }
}
```

**Response:** `created_count` and `created_layers` with `layer_uuid`, `name`, and `company_uuid` for each snapshot created.

**Notes:**

* Snapshots are always created **locked** and cannot be overwritten via MCP.
* If no values exist for the chosen source layers and period range, the call fails.

## Layer groups

Groups are named sets of `layer_uuid` members per company. Use them in `resolve_report`:

* **Standard:** `selectedLayerGroupUuids`
* **Rolling forecast:** per slice in `periodSlices[].selectedLayerGroupUuids`
* **Comparison:** per side in `compareSides.sideA` / `sideB` as `selectedLayerGroupUuids`

1. `list_layer_groups` — show existing groups
2. `create_layer_group` — new group with `companyUuid`, `name`, and `layerUuids`
3. `delete_layer_group` — remove the group (members remain as individual layers)

To rename or change the members: delete the group and create it again.

## Recommended flow

1. `list_companies`
2. `list_layers` (optionally filtered by `companyUuid`)
3. Choose default or desired source layers as `sourceLayerUuids`
4. Call `create_snapshot_layers`
5. `list_layers` again — new entries with `layer_type: snapshot` and `is_locked: true`
6. Optional: use the snapshot or a forecast layer in `resolve_report` (standard, rolling forecast, or comparison — see [Reports](/en/mcp/reports))

## Typical use cases

* Freeze month-end before new imports or plan values arrive
* Keep a business plan or forecast state as a locked reference layer
* Merge several source layers (import + manual) into one snapshot


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.