Skip to content

Approval programs: approve, refuse

The Approval Verbs approve, refuse as MCP do programs, with inputs, result, refusals and an example.

Reference for Approval, one group of Approval programs.

Approval.approve

Approve allows the pending Action an Approval holds, and that Action runs. Verb page.

Text
do: return await $.Approval.approve(input)

Emits Approval.approved.

Inputs

InputTypeRequiredDescription
approvalApprovalrequiredThe open Approval.
notetextWhy it is approved.

Returns

OutputTypeRequiredDescription
approvalApprovalrequiredThe approved Approval.

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 $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })"
  }
}

Approval.refuse

Refuse declines an Approval, which sets the Action it holds to refused with the reason given. Verb page.

Text
do: return await $.Approval.refuse(input)

Emits Approval.refused.

Inputs

InputTypeRequiredDescription
approvalApprovalrequiredThe open Approval.
reasontextrequiredWhy it is refused.

Returns

OutputTypeRequiredDescription
approvalApprovalrequiredThe refused Approval.

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 $.Approval.refuse({ approval: 'approval_TlxQeWh9uX', reason: 'Example reason' })"
  }
}