# Retry product tube centre line (`retry_product_tube_centre_line`)

Starts the tube centre-line trace of a neon product again, as Try again does on the product in the merchant admin, so its tube centre-line DXF can still arrive on the order line item. Only a trace that ended with timeout or trace_failed, of an order whose cart is stored, starts again; retried is then true and the status is pending. A trace that is pending already is left as it stands, with retried false. Any other product is refused because nothing can run again. Each connection can make six retry attempts a minute, refused ones included; a replay does not count. It requires the products:write scope and an idempotency_key.

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

## Purpose

Recover a neon order line item whose tube centre-line DXF was refused with timeout or trace_failed, as get_order reports it.

## Annotations

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

## Prerequisites

- The product id: the order line item id from get_order, or an id from list_integration_products.
- A merchant has connected this store and approved the products:write scope.

## Side effects

- Sets the tube centre-line trace of the product back to pending and queues it to run again from the stored order cart. A trace that is pending already is not changed.
- Uses one of the six retry attempts this connection may make in a minute, even when the attempt is refused. A replay uses none.
- Claims the idempotency_key for at least 24 hours.

## Arguments

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `product_id` | integer | yes | The product id: the order line item id from get_order, or an id from list_integration_products. |
| `idempotency_key` | string | yes | 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. |

## Result

Whether the trace started again, and the tube centre-line state as it now stands: its status, the refusal reason and whether another retry could start it.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `request_id` | string | yes |  |
| `store` | object | yes |  |
| `store.id` | integer | yes |  |
| `store.name` | string | yes |  |
| `product_id` | integer | yes |  |
| `retried` | boolean | yes | True when the trace started again; false when a trace was pending already and was left as it stands. |
| `tube_centre_line` | object | yes |  |
| `tube_centre_line.status` | string | yes | none (no trace was requested), pending, ready (the file is present) or refused (read refusal_reason). Expected to grow. One of: `none`, `pending`, `ready`, `refused`. |
| `tube_centre_line.refusal_reason` | string or null | no | Why the file was not made; null unless status is refused. Only timeout and trace_failed can change on another run. Expected to grow. One of: `ai_design`, `icon`, `no_physical_size`, `no_tubes`, `timeout`, `trace_failed`, `unsupported_characters`. |
| `tube_centre_line.can_retry` | boolean | yes | Whether another retry would start the trace again. |
| `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 |
| --- | --- |
| `idempotency_key_conflict` | That key was used for another call. Re-send the original arguments or issue a new key. |
| `insufficient_scope` | The connection was approved without products:write. |
| `rate_limited` | This connection has made six retry attempts in the last minute. Wait retry_after seconds. |
| `resource_not_found` | No product with that id belongs to this store. Call list_integration_products to find a valid id. |
| `tube_centre_line_not_retryable` | The trace cannot run again: the refusal reason is final, the order cart is not stored, the file exists or no trace was requested. |

## Example: Start a failed trace again

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "retry_product_tube_centre_line",
    "arguments": {
      "product_id": 731,
      "idempotency_key": "3f4b8e21-6a0c-4d1e-9b77-2c5d8a9e0f13"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "product_id": 731,
      "retried": true,
      "tube_centre_line": {
        "status": "pending",
        "refusal_reason": null,
        "can_retry": false
      },
      "idempotent_replay": false
    }
  }
}
```

## Example: A trace with a final reason (error)

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "retry_product_tube_centre_line",
    "arguments": {
      "product_id": 732,
      "idempotency_key": "4a5b6c7d-8e9f-4a0b-9c1d-2e3f4a5b6c7d"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "tube_centre_line_not_retryable",
        "title": "Tube centre line not retryable",
        "detail": "This product has no tube centre-line trace that can run again.",
        "recovery": "The tube centre-line trace cannot run again: its reason is final, the order cart is not stored, the file exists or no trace was requested. Read tube_centre_line_status and refusal_reason on the order line item; only timeout and trace_failed can be tried again."
      }
    }
  }
}
```
