Skip to content

Audit Tools

Audit tools let you query the event history of your thogits and tags, and detect schema version drift after tag schema changes.

Query the audit log for events. All filter parameters are optional and AND-combined.

NameTypeRequiredDescription
limitintegerNoMax events to return. Default: 50, max: 1000
afterstringNoISO 8601 datetime — return events after this time
beforestringNoISO 8601 datetime — return events before this time
thogit_idsarrayNoFilter to events involving these thogit ULIDs
tag_idsarrayNoFilter to events involving these tag ULIDs
event_typesarrayNoFilter to specific event types
Event TypeDescription
thogit_createdA thogit was created
thogit_updatedA thogit’s name or description was changed
thogit_deletedA thogit was deleted
tag_createdA tag was created
tag_updatedA tag’s name, description, or schema was changed
tag_deletedA tag was deleted
tag_appliedA tag was applied to a thogit
tag_removedA tag was removed from a thogit
tag_values_updatedA tag’s field values on a thogit were updated
// Request — get recent tag-related events for a specific thogit
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "query_audit_log",
"arguments": {
"limit": 20,
"thogit_ids": ["01JEXAMPLE0000000000THOGIT"],
"event_types": ["tag_applied", "tag_removed", "tag_values_updated"]
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "[\n {\n \"id\": \"01JEXAMPLE0000000000AUDIT1\",\n \"event_type\": \"tag_applied\",\n \"thogit_id\": \"01JEXAMPLE0000000000THOGIT\",\n \"tag_id\": \"01JEXAMPLE00000000000TAGID\",\n \"user_id\": \"user_123\",\n \"details\": { ... },\n \"created_at\": \"2025-01-15T10:30:00Z\"\n },\n {\n \"id\": \"01JEXAMPLE0000000000AUDIT2\",\n \"event_type\": \"tag_values_updated\",\n \"thogit_id\": \"01JEXAMPLE0000000000THOGIT\",\n \"tag_id\": \"01JEXAMPLE00000000000TAGID\",\n \"user_id\": \"user_123\",\n \"details\": { ... },\n \"created_at\": \"2025-01-15T11:00:00Z\"\n }\n]"
}
]
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "query_audit_log",
"arguments": {
"after": "2025-01-01T00:00:00Z",
"before": "2025-02-01T00:00:00Z",
"limit": 100
}
}
}

Find thogit-tag associations where the stored schema_version is less than the tag’s current schema_version. This happens after you edit a tag’s fields — existing thogits retain their old schema version until their field values are explicitly updated.

NameTypeRequiredDescription
tag_idstringNoFilter to a specific tag. Omit to check all tags.
// Request — find all outdated associations for a specific tag
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "get_outdated_thogit_tags",
"arguments": {
"tag_id": "01JEXAMPLE00000000000TAGID"
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "[\n {\n \"thogit_id\": \"01JEXAMPLE0000000000THOGIT\",\n \"tag_id\": \"01JEXAMPLE00000000000TAGID\",\n \"stored_schema_version\": 1,\n \"current_schema_version\": 3\n },\n {\n \"thogit_id\": \"01JEXAMPLE000000000THOGIT2\",\n \"tag_id\": \"01JEXAMPLE00000000000TAGID\",\n \"stored_schema_version\": 2,\n \"current_schema_version\": 3\n }\n]"
}
]
}
}
  1. Edit the tag schema with edit_tag to add, remove, or change fields.

  2. Find outdated associations with get_outdated_thogit_tags to see which thogits are behind.

  3. Update field values with bulk_update_field_values using merge: true to bring them up to the current schema version.