Skip to content

Action programs: answer, ask, attest

The Action Verbs answer, ask, attest as MCP do programs, with inputs, result, refusals and an example.

Reference for Action, one group of Action programs.

Action.answer

Answer gives the reply to an Action’s open Question, through any Interface, and the Action resumes. Verb page.

Text
do: return await $.Action.answer(input)

Emits Action.answered.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe Action waiting on the Question.
questionQuestionrequiredThe Question answered.
payloadjsonrequiredThe answer, matching the Question’s choices or schema.

Returns

OutputTypeRequiredDescription
actionActionrequiredThe resumed Action.

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 $.Action.answer({ action: 'act_br07HsG8MG', question: 'question_zuqUHd8LwY', payload: {} })"
  }
}

Action.ask

Ask puts a Question to a Party, a Role, or a Worker and holds the Action pending with reason awaitingInput. Verb page.

Text
do: return await $.Action.ask(input)

Emits Action.asked.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe Action that needs an answer to go on.
toThingrequiredWho is asked: a Party, a Role, or a Worker.
texttextrequiredThe question, in one message.
choicesstring[]The answers offered.
schemajsonThe typed answer’s shape.
answerBydatetimeWhen the Action’s timeout rule applies.

Returns

OutputTypeRequiredDescription
questionQuestionrequiredThe Question, posted in the record’s Thread.
actionActionrequiredThe Action, now pending with reason awaitingInput.

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 $.Action.ask({ action: 'act_br07HsG8MG', to: 'thing_8ds0r9vvRl', text: 'Example text' })"
  }
}

Action.attest

Attest records a credentialed Human’s signed performance of a Reserved Act that an Action needs to finish. Verb page.

Text
do: return await $.Action.attest(input)

Emits Action.attested.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe Action that waits on the Reserved Act.
credentialCredentialrequiredThe Credential that authorizes it.

Returns

OutputTypeRequiredDescription
actionActionrequiredThe Action, free to finish.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
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 $.Action.attest({ action: 'act_br07HsG8MG', credential: 'credential_Abb9zatRR1' })"
  }
}