Skip to content

Workflow programs: update, delete

The Workflow Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

Reference for Workflow, one group of Workflow programs.

Workflow.update

Changes the given properties of a Workflow. Verb page.

Text
do: return await $.Workflow.update(input)

Emits Workflow.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Workflow.
stepsjsonThe ordered steps, each run by a Function.
retriesintegerHow many times a failed step retries.
bodystringThe Verb whose Action it is the durable body of, such as Order.refund; a Workflow with a body has no Trigger.

Returns

OutputTypeRequiredDescription
workflowWorkflowrequiredThe Workflow.

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 $.Workflow.update({ id: 'workflow_2dhYBlEno0', steps: {} })"
  }
}

Workflow.delete

Deletes a Workflow: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
do: return await $.Workflow.delete(input)

Emits Workflow.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Workflow.

Returns

OutputTypeRequiredDescription
workflowWorkflowrequiredThe Workflow.

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 $.Workflow.delete({ id: 'workflow_2dhYBlEno0' })"
  }
}