Skip to content

Collection programs: update, delete

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

Reference for Collection, one group of Collection programs.

Collection.update

Changes the given properties of a Collection. Verb page.

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

Emits Collection.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Collection.
typelist of NounThe Nouns this Thing is an instance of.
outsidejsonThe ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating.
queryjsonThe saved query that defines a dynamic Collection.

Returns

OutputTypeRequiredDescription
collectionCollectionrequiredThe Collection.

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 $.Collection.update({ id: 'collection_txTK8QorKn', query: {} })"
  }
}

Collection.delete

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

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

Emits Collection.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Collection.

Returns

OutputTypeRequiredDescription
collectionCollectionrequiredThe Collection.

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