# Watch programs: update, delete

URL: /code/mcp/watch/records-update · Id: `page:code/mcp/watch/records-update`

> The Watch Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

Reference for [Watch](/business/nouns/watch), one group of [Watch programs](/code/mcp/watch).

### Watch.update
Changes the given properties of a Watch. [Verb page](/business/nouns/watch/update?interface=mcp).

```text
do: return await $.Watch.update(input)
```

Emits `Watch.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Watch. |
| `selector` | `string` | No | The Event selector, such as `Order.placed`. |
| `url` | `url` | No | Where deliveries go. |
| `payload` | `string` | No | One of `full`, or `thin`: the record as the Action left it, or only its versioned address. The default is full. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Watch.update({ id: 'watch_9o4vCuR17L', url: 'https://leaseline.app' })"
  }
}
```

### Watch.delete
Deletes a Watch: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/watch/delete?interface=mcp).

```text
do: return await $.Watch.delete(input)
```

Emits `Watch.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Watch. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Watch.delete({ id: 'watch_9o4vCuR17L' })"
  }
}
```