Skip to content

Decision programs

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

Reference for Decision.

NounSystemRun by
DecisionGoalsStrategist

Decision.create

Creates a Decision. Verb page.

Text
do: return await $.Decision.create(input)

Emits Decision.created.

Inputs

InputTypeRequiredDescription
choicetextrequiredWhat was chosen.
reasontextrequiredWhy it was chosen.
stakesstringOne of low, medium, or high, which sets the delay window.
thingThingA Decision records one choice about a Thing and stays on that Thing’s record forever.
meetingMeetingA Meeting records Decisions, each with its options, choice and reason.

Returns

OutputTypeRequiredDescription
decisionDecisionrequiredThe Decision.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.

Text
do: return await $.Decision.get(input)

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Decision.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
decisionDecisionrequiredThe Decision.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.

Text
do: return await $.Decision.list(input)

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
limitintegerAt most this many records, up to 100. The default is 20.
afterstringThe cursor from the previous page.
wherestringA filter over the properties, such as paidAt = null and total.amount > 500.
sortstringProperties to sort by, comma-separated; a leading minus sorts descending.
totalbooleanTrue adds the match count as meta.total, exact up to 10,000 matches and estimated above.
facetsstringProperties to count by value, comma-separated, returned as meta.facets.
fieldsstringProperties to return on each record, comma-separated; $id and $type always return.
includestringRelated records to embed in place of their URLs, comma-separated.
depthintegerHow many levels of related records to embed. The default is 1.
qstringWords to match across the text properties, ranked by relevance.
matchstringRanks the search by words, or meaning; words is the default.

Returns

OutputTypeRequiredDescription
decisionslist of DecisionrequiredOne page of Decisions.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.

Text
do: return await $.Decision.supersede(input)

Emits Decision.superseded.

Inputs

InputTypeRequiredDescription
decisionDecisionrequiredThe Decision to replace.
byDecisionrequiredThe newer Decision.

Returns

OutputTypeRequiredDescription
decisionDecisionrequiredThe superseded Decision.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.refusedRead 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' })"
  }
}