> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.solvimon.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.solvimon.com/_mcp/server.

# create_meter_setup

**Live server:** test server (`test.mcp.solvimon.com`) only.

Creates a meter, a meter value, and a meter value calculation in one call, or adds a value and calculation to an existing meter. Returns the `mvc_...` id to set as `meter_value_calculation_id` on a `USAGE_BASED` product item. If a step fails, the earlier steps are undone.

| Parameter                                   | Required                     | Description                                                               |
| ------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------- |
| `meter_name`, `meter_reference`             | Yes, unless `meter_id`       | Display name and unique reference of a new meter                          |
| `meter_id`                                  | No                           | Add to this existing meter instead                                        |
| `value_name`, `value_reference`             | Yes, unless `meter_value_id` | Display name and unique reference of a new meter value                    |
| `meter_value_id`                            | No                           | Use this existing ACTIVE meter value instead                              |
| `value_required`                            | No                           | Make a value added to an existing meter required. Default `false`         |
| `calculation_type`                          | No                           | Aggregation method: `SUM` (default), `MAX`, `MIN`, `AVERAGE`, or `UNIQUE` |
| `calculation_name`, `calculation_reference` | No                           | Generated when left out                                                   |
| `value_type`                                | No                           | Data type of the meter value. Default `NUMBER`.                           |
| `persist`                                   | No                           | Whether to persist the calculation output. Default `false`.               |

**`Create a meter setup`**

```json Create a meter setup
{
  "meter_name": "API requests",
  "meter_reference": "api-requests",
  "value_name": "count",
  "value_reference": "api-requests-count",
  "calculation_type": "SUM"
}
```