# Update store (`update_store`)

Applies a JSON merge patch to one section of the connected Store. The store section holds the Store name, contact email, website, primary colour, branded emails setting and the zero-price product guard, and on a Universal Store also the currency and its two display formats. The customiser_links section holds the hosted Customiser Links page: whether it is on, its Back to Store address and its background colour. Only the fields present change, and a field the section does not accept is refused. Units are not patchable here: use review_store_unit_switch and switch_store_units. Logos are changed with attach_store_logo and delete_store_logo. It requires the store:write scope, takes an optional idempotency_key for replay, and supports dry_run.

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

## Purpose

Change the Store details or the Customiser Links page, one section at a time.

## Annotations

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

## Prerequisites

- The current values: get_store for the store section, get_customiser_links for the customiser_links section.
- A merchant has connected this store and approved the store:write scope.

## Side effects

- Changes the named section of the connected Store.
- A new name, contact email or primary colour shows in emails sent after the change.

## Arguments

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `section` | string | yes | Which document to patch: store for the Store details, customiser_links for the hosted Customiser Links page. One of: `store`, `customiser_links`. |
| `patch` | object | yes | The RFC 7396 merge patch to apply. Only the members present change; a member set to null clears a nullable field. store accepts name, contact_email, website_url, primary_colour, use_branding_for_emails and prevent_zero_price_products, and on a Universal Store also currency, currency_format_with_code and currency_format_without_code. customiser_links accepts enabled, return_url and theme_colour. |
| `idempotency_key` | string | no | An optional client-generated key unique to this logical write, such as a UUID. Repeating the call with the same key and the same arguments replays the original result; the route does not require one. |
| `dry_run` | boolean | no | When true, the patch is checked against the section schema 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. |

## Result

The patched section as it now stands: the Store for store, the Customiser Links page for customiser_links. A dry run returns the update verdict instead and writes nothing.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `request_id` | string | yes |  |
| `store` | object | yes |  |
| `store.id` | integer | yes |  |
| `store.name` | string | yes |  |
| `section` | string | yes | The section the patch was applied to. One of: `store`, `customiser_links`. |
| `store_details` | object | no | The Store as get_store reads it, present only when section was store. |
| `customiser_links` | object | no | The Customiser Links page as get_customiser_links reads it, present only when section was customiser_links. |
| `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 update verdict. |
| `idempotent_replay` | boolean | no | True when this call replayed a previously recorded response for the same idempotency_key instead of applying the write again. |

## Error cases

| Code | Recovery |
| --- | --- |
| `insufficient_scope` | The connection was approved without store:write. Ask the merchant to reconnect and approve it, or to remove the connector and add it again if the approval screen does not offer it. |
| `unknown_field` | The patch names a field this section does not have. Remove the field named by pointer. |
| `validation_failed` | A value is out of range or the wrong type, a read-only field such as measurement_unit or logo_url was sent, or a currency field was sent for a Shopify Store, whose currency comes from Shopify. |

## Example: Change the contact email

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_store",
    "arguments": {
      "section": "store",
      "patch": {
        "contact_email": "orders@demosigns.example"
      }
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "idempotent_replay": false,
      "section": "store",
      "store_details": {
        "id": 12,
        "name": "Demo Signs",
        "platform": "universal",
        "currency": "GBP",
        "contact_email": "orders@demosigns.example",
        "website_url": "https://demosigns.example",
        "primary_colour": "#1A73E8",
        "use_branding_for_emails": true,
        "logo_url": null,
        "prevent_zero_price_products": true
      }
    }
  }
}
```

## Example: Units are not patchable (error)

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_store",
    "arguments": {
      "section": "store",
      "patch": {
        "measurement_unit": "cm"
      }
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "validation_failed",
        "title": "Validation failed",
        "detail": "The request payload failed validation.",
        "recovery": "Correct every field listed in errors, using its pointer to locate the value and allowed_values where one is given, then call the tool again.",
        "pointer": "/measurement_unit"
      }
    }
  }
}
```
