# Decision programs

URL: /code/mcp/decision · Id: `page:code/mcp/decision`

> Every Decision Verb as an MCP do program, with its inputs, result, refusals and an example.

Reference for [Decision](/business/nouns/decision).

| Noun | System | Run by |
| --- | --- | --- |
| [Decision](/business/nouns/decision) | [Goals](/business/goals) | [Strategist](/agents/founding/strategist) |

### Decision.create
Creates a Decision. [Verb page](/business/nouns/decision/create?interface=mcp).

```text
do: return await $.Decision.create(input)
```

Emits `Decision.created`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `choice` | `text` | Yes | What was chosen. |
| `reason` | `text` | Yes | Why it was chosen. |
| `stakes` | `string` | No | One of `low`, `medium`, or `high`, which sets the delay window. |
| `thing` | [Thing](/business/nouns/thing) | No | A Decision records one choice about a Thing and stays on that Thing’s record forever. |
| `meeting` | [Meeting](/business/nouns/meeting) | No | A Meeting records Decisions, each with its options, choice and reason. |

**Returns**

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

**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 $.Decision.create({ choice: 'Example choice', reason: 'Example reason' })"
  }
}
```

### Decision.get
Returns one Decision by id. [Verb page](/business/nouns/decision/get?interface=mcp).

```text
do: return await $.Decision.get(input)
```

Reads only: it emits no Event.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Decision. |
| `at` | `string` | No | A time or Version name: the record as it stood then. Unset: as it stands now. |

**Returns**

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

**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 $.Decision.get({ id: 'decision_ipoch3tTJh' })"
  }
}
```

### Decision.list
Returns Decisions, newest first, one page at a time. [Verb page](/business/nouns/decision/list?interface=mcp).

```text
do: return await $.Decision.list(input)
```

Reads only: it emits no Event.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | At most this many records, up to 100. The default is 20. |
| `after` | `string` | No | The cursor from the previous page. |
| `where` | `string` | No | A filter over the properties, such as `paidAt = null and total.amount > 500`. |
| `sort` | `string` | No | Properties to sort by, comma-separated; a leading minus sorts descending. |
| `total` | `boolean` | No | True adds the match count as `meta.total`, exact up to 10,000 matches and estimated above. |
| `facets` | `string` | No | Properties to count by value, comma-separated, returned as `meta.facets`. |
| `fields` | `string` | No | Properties to return on each record, comma-separated; `$id` and `$type` always return. |
| `include` | `string` | No | Related records to embed in place of their URLs, comma-separated. |
| `depth` | `integer` | No | How many levels of related records to embed. The default is 1. |
| `q` | `string` | No | Words to match across the text properties, ranked by relevance. |
| `match` | `string` | No | Ranks the search by `words`, or `meaning`; words is the default. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `decisions` | list of [Decision](/business/nouns/decision) | Yes | One page of Decisions. |

**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 $.Decision.list({ limit: 20 })"
  }
}
```

### Decision.supersede
Supersede replaces a Decision with a newer one, keeping both on record with the reason for the change. [Verb page](/business/nouns/decision/supersede?interface=mcp).

```text
do: return await $.Decision.supersede(input)
```

Emits [`Decision.superseded`](/business/events/Decision.superseded).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `decision` | [Decision](/business/nouns/decision) | Yes | The Decision to replace. |
| `by` | [Decision](/business/nouns/decision) | Yes | The newer Decision. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `decision` | [Decision](/business/nouns/decision) | Yes | The superseded Decision. |

**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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Decision.supersede({ decision: 'decision_ipoch3tTJh', by: 'decision_ipoch3tTJh' })"
  }
}
```