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_audit_log
Section titled “query_audit_log”Query the audit log for events. All filter parameters are optional and AND-combined.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Max events to return. Default: 50, max: 1000 |
after | string | No | ISO 8601 datetime — return events after this time |
before | string | No | ISO 8601 datetime — return events before this time |
thogit_ids | array | No | Filter to events involving these thogit ULIDs |
tag_ids | array | No | Filter to events involving these tag ULIDs |
event_types | array | No | Filter to specific event types |
Event Types
Section titled “Event Types”| Event Type | Description |
|---|---|
thogit_created | A thogit was created |
thogit_updated | A thogit’s name or description was changed |
thogit_deleted | A thogit was deleted |
tag_created | A tag was created |
tag_updated | A tag’s name, description, or schema was changed |
tag_deleted | A tag was deleted |
tag_applied | A tag was applied to a thogit |
tag_removed | A tag was removed from a thogit |
tag_values_updated | A tag’s field values on a thogit were updated |
Example
Section titled “Example”// 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 } }}{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "query_audit_log", "arguments": { "tag_ids": ["01JEXAMPLE00000000000TAGID"], "event_types": ["tag_updated"] } }}get_outdated_thogit_tags
Section titled “get_outdated_thogit_tags”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.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
tag_id | string | No | Filter to a specific tag. Omit to check all tags. |
Example
Section titled “Example”// 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]" } ] }}Schema Migration Workflow
Section titled “Schema Migration Workflow”-
Edit the tag schema with
edit_tagto add, remove, or change fields. -
Find outdated associations with
get_outdated_thogit_tagsto see which thogits are behind. -
Update field values with
bulk_update_field_valuesusingmerge: trueto bring them up to the current schema version.