Skip to content

Visitor programs: update, delete

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

Reference for Visitor, one group of Visitor programs.

Visitor.update

Changes the given properties of a Visitor. Verb page.

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

Emits Visitor.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Visitor.
firstSeenAtdatetimeWhen the first request arrived.

Returns

OutputTypeRequiredDescription
visitorVisitorrequiredThe Visitor.

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 $.Visitor.update({ id: 'visitor_M5gHadysq9', firstSeenAt: '2026-10-22T12:00:00Z' })"
  }
}

Visitor.delete

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

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

Emits Visitor.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Visitor.

Returns

OutputTypeRequiredDescription
visitorVisitorrequiredThe Visitor.

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