Skip to content

Lifecycle Tools

Thogits use soft deletion — when you delete a thogit, it is hidden but not destroyed. These tools let you manage the soft-delete lifecycle: list deleted thogits, restore them, or permanently purge them.

Restore a soft-deleted thogit, making it active again.

NameTypeRequiredDescription
thogit_idstringYesULID of the deleted thogit to restore
// Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "restore_thogit",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT"
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "\"ok\""
}
]
}
}

List all soft-deleted thogits. No parameters required.

None.

// Request
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "list_deleted_thogits",
"arguments": {}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "[\n {\n \"id\": \"01JEXAMPLE0000000000THOGIT\",\n \"name\": \"Old design notes\",\n \"description\": \"Early brainstorming that is no longer relevant\",\n \"tags\": [...],\n \"created_at\": \"2025-01-10T08:00:00Z\",\n \"deleted_at\": \"2025-01-20T14:30:00Z\"\n },\n {\n \"id\": \"01JEXAMPLE000000000THOGIT2\",\n \"name\": \"Duplicate entry\",\n \"description\": \"Accidentally created twice\",\n \"tags\": [],\n \"created_at\": \"2025-01-12T09:00:00Z\",\n \"deleted_at\": \"2025-01-20T14:31:00Z\"\n }\n]"
}
]
}
}

Permanently delete all soft-deleted thogits. This is irreversible.

None.

// Request
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "purge_deleted_thogits",
"arguments": {}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"purged_count\": 2\n}"
}
]
}
}

  1. List deleted thogits to find the one you want to restore.

    {
    "jsonrpc": "2.0", "id": 10,
    "method": "tools/call",
    "params": { "name": "list_deleted_thogits", "arguments": {} }
    }
  2. Restore it by ID.

    {
    "jsonrpc": "2.0", "id": 11,
    "method": "tools/call",
    "params": {
    "name": "restore_thogit",
    "arguments": { "thogit_id": "01JEXAMPLE0000000000THOGIT" }
    }
    }
  3. Verify the thogit is back by fetching it.

    {
    "jsonrpc": "2.0", "id": 12,
    "method": "tools/call",
    "params": {
    "name": "get_thogit",
    "arguments": { "thogit_id": "01JEXAMPLE0000000000THOGIT" }
    }
    }
  1. Delete thogits individually or in bulk.

    {
    "jsonrpc": "2.0", "id": 20,
    "method": "tools/call",
    "params": {
    "name": "bulk_delete_thogits",
    "arguments": {
    "filter": { "and": [{ "has_tag": "Task" }, { "Task.status": { "match": "done" } }] },
    "dry_run": false
    }
    }
    }
  2. Review deleted thogits before purging.

    {
    "jsonrpc": "2.0", "id": 21,
    "method": "tools/call",
    "params": { "name": "list_deleted_thogits", "arguments": {} }
    }
  3. Purge permanently once you are sure.

    {
    "jsonrpc": "2.0", "id": 22,
    "method": "tools/call",
    "params": { "name": "purge_deleted_thogits", "arguments": {} }
    }