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.
do: return await $.Action.answer(input)Emits Action.answered.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
action | Action | required | The Action waiting on the Question. |
question | Question | required | The Question answered. |
payload | json | required | The answer, matching the Question’s choices or schema. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
action | Action | required | The resumed Action. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"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.
do: return await $.Action.ask(input)Emits Action.asked.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
action | Action | required | The Action that needs an answer to go on. |
to | Thing | required | Who is asked: a Party, a Role, or a Worker. |
text | text | required | The question, in one message. |
choices | string[] | The answers offered. | |
schema | json | The typed answer’s shape. | |
answerBy | datetime | When the Action’s timeout rule applies. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
question | Question | required | The Question, posted in the record’s Thread. |
action | Action | required | The Action, now pending with reason awaitingInput. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"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.
do: return await $.Action.attest(input)Emits Action.attested.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
action | Action | required | The Action that waits on the Reserved Act. |
credential | Credential | required | The Credential that authorizes it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
action | Action | required | The Action, free to finish. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read 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. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Action.attest({ action: 'act_br07HsG8MG', credential: 'credential_Abb9zatRR1' })"
}
}