# Budget programs: update, delete

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

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

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

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

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

Emits `Budget.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Budget. |
| `account` | `string` | No | The chart-of-accounts code it plans, such as `expense.ads`. |
| `period` | [Period](/business/nouns/period) | No | The Period it plans. |
| `amount` | `money` | No | The amount set for the account in the Period. |

**Returns**

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

**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 $.Budget.update({ id: 'budget_qnCdsFGLVN', account: 'expense.ads' })"
  }
}
```

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

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

Emits `Budget.deleted`.

**Inputs**

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

**Returns**

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

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