# Delete customiser length pricing (`delete_customiser_length_pricing`)

Deletes one length pricing of a customiser permanently, so the call requires confirm true and changes nothing without it. A price list that a font or the icon settings still price by is refused with resource_in_use, which lists the referencing records; references are never cleared silently. Calling with dry_run true first returns the same verdict without deleting anything. The result carries the price list as it was. It requires the pricing:write scope and an idempotency_key.

- Source URL: https://www.signcustomiser.com/help/mcp/tools/delete_customiser_length_pricing/
- Markdown URL: https://www.signcustomiser.com/help/mcp/tools/delete_customiser_length_pricing.md
- MCP endpoint: https://mcp.signcustomiser.com
- Required scope: `pricing:write`
- Behaviour: destructive write

## Purpose

Remove a length pricing that nothing prices by any more, after the merchant has agreed to it.

## Annotations

| Hint | Value |
| --- | --- |
| readOnlyHint | false |
| destructiveHint | true |
| idempotentHint | true |
| openWorldHint | false |

## Prerequisites

- A customiser id from list_customisers and a length pricing id from list_customiser_length_pricings.
- The merchant explicit agreement, sent as confirm true.
- A merchant has connected this store and approved the pricing:write scope.

## Side effects

- Deletes one length pricing and its rows permanently.
- Clears the customiser cached storefront configuration.
- Spends one unit of the store option-write budget.
- Claims the idempotency_key for at least 24 hours.

## Arguments

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `customiser_id` | integer | yes | The customiser id, from list_customisers. |
| `length_pricing_id` | integer | yes | The length pricing id, from list_customiser_length_pricings. |
| `confirm` | boolean | unless `dry_run` is true | Must be true to apply the change, because the price list and its rows are removed permanently and cannot be restored through this connector. Without it the call returns a confirmation_required error and changes nothing. |
| `idempotency_key` | string | unless `dry_run` is true | A client-generated key unique to this logical write, such as a UUID. Required: repeating the call with the same key and the same arguments replays the original result instead of writing twice, and the same key with different arguments is an idempotency_key_conflict. |
| `dry_run` | boolean | no | When true, the deletion is checked against every font and setting that still prices by the list is checked and nothing is written: the result is the same verdict the apply would have reached, and a problem the apply would have raised comes back as the same tool error. Defaults to false. A dry run claims no key. A dry run does not require the confirm argument. |

## Result

The deleted price list id and the price list as it was, with every row. A dry run returns the delete verdict instead and deletes nothing.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `request_id` | string | yes |  |
| `store` | object | yes |  |
| `store.id` | integer | yes |  |
| `store.name` | string | yes |  |
| `customiser_id` | integer | yes |  |
| `length_pricing_id` | integer | yes |  |
| `deleted` | boolean | no | True when the price list was deleted. Absent on a dry run, where nothing is deleted. |
| `length_pricing` | object | no | The price list as it was when it was deleted, so the caller can report or recreate it. Absent on a dry run. |
| `length_pricing.id` | integer | yes |  |
| `length_pricing.customiser_id` | integer | yes |  |
| `length_pricing.name` | string or null | no |  |
| `length_pricing.letter_pricing_mode` | string or null | no | One of: `every_letter_cost`, `price_by_position`. |
| `length_pricing.letter_pricing_method` | string or null | no | One of: `material_length`, `fixed_letter`. |
| `length_pricing.shipping` | object | no |  |
| `length_pricing.shipping.calculation` | string or null | no |  |
| `length_pricing.shipping.volumetric_divisor` | integer or null | no |  |
| `length_pricing.shipping.volumetric_divisor_authored` | integer or null | no |  |
| `length_pricing.shipping.volumetric_divisor_unit` | string or null | no |  |
| `length_pricing.shipping.volumetric_divisor_canonical` | number or null | no |  |
| `length_pricing.shipping.authored_units` | object | no |  |
| `length_pricing.shipping.add_weight_to_product` | boolean | no |  |
| `length_pricing.currency` | string or null | no | The ISO 4217 currency of every integer minor-unit amount on the record. |
| `length_pricing.rows_revision` | integer | no |  |
| `length_pricing.rows` | array of object | no |  |
| `length_pricing.rows[].id` | string | no |  |
| `length_pricing.rows[].base_price` | number or null | no |  |
| `length_pricing.rows[].price_per_letter` | number or null | no |  |
| `length_pricing.rows[].price_per_cm` | number or null | no |  |
| `length_pricing.rows[].price_per_in` | number or null | no |  |
| `length_pricing.rows[].price_per_sq_cm` | number or null | no |  |
| `length_pricing.rows[].price_per_sq_in` | number or null | no |  |
| `length_pricing.rows[].price_per_lb` | number or null | no |  |
| `length_pricing.rows[].max_price_multiplier` | number or null | no |  |
| `length_pricing.rows[].width_limit_cm` | number or null | no |  |
| `length_pricing.rows[].width_limit_in` | number or null | no |  |
| `length_pricing.rows[].height_limit_cm` | number or null | no |  |
| `length_pricing.rows[].height_limit_in` | number or null | no |  |
| `length_pricing.rows[].length_limit_cm` | number or null | no |  |
| `length_pricing.rows[].length_limit_in` | number or null | no |  |
| `length_pricing.rows[].fixed_length_cm` | number or null | no |  |
| `length_pricing.rows[].fixed_length_in` | number or null | no |  |
| `length_pricing.rows[].width_modifier` | number or null | no |  |
| `length_pricing.rows[].width_modifier_in` | number or null | no |  |
| `length_pricing.rows[].height_modifier` | number or null | no |  |
| `length_pricing.rows[].height_modifier_in` | number or null | no |  |
| `length_pricing.rows[].length_modifier` | number or null | no |  |
| `length_pricing.rows[].length_modifier_in` | number or null | no |  |
| `length_pricing.rows[].price_per_sq_cm_basis` | string | no | One of: `per_sq_cm`, `per_kg_volumetric`. |
| `length_pricing.rows[].price_per_letter_by_position` | array of integer | no |  |
| `length_pricing.rows[].authored_units` | object | no |  |
| `length_pricing.created_at` | string or null | no |  |
| `length_pricing.updated_at` | string or null | no |  |
| `idempotent_replay` | boolean | no | True when this call replayed a previously recorded response for the same idempotency_key instead of applying the write again. |
| `dry_run` | boolean | no | Present and true only when dry_run was requested. |
| `valid` | boolean | no | Present only on a dry run, and always true: a failing dry run returns a tool error instead. |
| `verdict` | object | no | Present only on a dry run: the delete verdict. |

## Error cases

| Code | Recovery |
| --- | --- |
| `confirmation_required` | Send confirm true once the merchant has agreed to the deletion. Nothing was deleted. |
| `idempotency_subject_changed` | The price list lifecycle changed after the recorded deletion. Issue a new key and re-check the resource before writing again. |
| `insufficient_scope` | The connection was approved without pricing:write. |
| `rate_limited` | The store option-write budget is spent. Wait retry_after seconds. |
| `resource_in_use` | A font or the icon settings still price by this list. referenced_by lists them; move them to another price list first. |
| `resource_not_found` | No length pricing with that id belongs to that customiser in this store. |

## Example: Delete a price list the merchant confirmed

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_customiser_length_pricing",
    "arguments": {
      "customiser_id": 42,
      "length_pricing_id": 9,
      "confirm": true,
      "idempotency_key": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "customiser_id": 42,
      "length_pricing_id": 9,
      "deleted": true,
      "length_pricing": {
        "id": 9,
        "customiser_id": 42,
        "name": "Standard",
        "letter_pricing_mode": "every_letter_cost",
        "letter_pricing_method": "fixed_letter",
        "shipping": {
          "calculation": "physical",
          "volumetric_divisor": null,
          "add_weight_to_product": false
        },
        "currency": "USD",
        "rows": [],
        "created_at": "2026-08-13T00:00:00Z",
        "updated_at": "2026-08-13T00:00:00Z"
      },
      "idempotent_replay": false
    }
  }
}
```

## Example: A price list a font still uses (error)

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_customiser_length_pricing",
    "arguments": {
      "customiser_id": 42,
      "length_pricing_id": 9,
      "dry_run": true
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "resource_in_use",
        "title": "Resource in use",
        "detail": "This length pricing is still referenced by font records.",
        "recovery": "Other records still reference this one. Call the same tool with dry_run: true to enumerate them, clear those references, then retry.",
        "referenced_by": [
          {
            "type": "font",
            "id": 19,
            "name": "Modern Sans"
          }
        ]
      }
    }
  }
}
```
