# Goal programs: update, delete

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

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

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

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

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

Emits `Goal.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Goal. |
| `objective` | `text` | No | The qualitative outcome. |
| `horizon` | `string` | No | One of `day`, `week`, `quarter`, `year`, or `three-years`. |

**Returns**

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

**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 $.Goal.update({ id: 'goal_L9PBQQhfuF', horizon: 'day' })"
  }
}
```

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

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

Emits `Goal.deleted`.

**Inputs**

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

**Returns**

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

**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 $.Goal.delete({ id: 'goal_L9PBQQhfuF' })"
  }
}
```