Skip to content

Bulk Operations

Bulk tools let you operate on multiple thogits in a single call. All destructive bulk operations support dry_run mode to preview what would be affected before committing.

All bulk operations (except bulk_add_thogits) return:

{
"matched_count": 12,
"affected_count": 10,
"affected_ids": ["01J...", "01J...", "..."],
"dry_run": false
}
FieldDescription
matched_countNumber of thogits that matched the filter
affected_countNumber of thogits actually modified
affected_idsULIDs of affected thogits
dry_runWhether this was a preview (no changes made)

Create multiple thogits in one call. Each entry follows the same schema as add_thogit.

NameTypeRequiredDescription
thogitsarrayYesArray of thogit objects (name, description, optional tags)
// Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "bulk_add_thogits",
"arguments": {
"thogits": [
{
"name": "Set up CI pipeline",
"description": "Configure GitHub Actions for lint, test, build",
"tags": [
{
"tag_ref": { "Existing": "01JEXAMPLE00000000000TAGID" },
"field_values": { "status": { "variant": "todo" }, "priority": 7 }
}
]
},
{
"name": "Write API docs",
"description": "Document all REST endpoints with examples",
"tags": [
{
"tag_ref": { "Existing": "01JEXAMPLE00000000000TAGID" },
"field_values": { "status": { "variant": "todo" }, "priority": 5 }
}
]
}
]
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"thogit_ids\": [\"01JEXAMPLE000000000THOGIT1\", \"01JEXAMPLE000000000THOGIT2\"],\n \"count\": 2\n}"
}
]
}
}

Delete all thogits matching a filter. Use dry_run: true to preview.

NameTypeRequiredDescription
filterThogitFilterYesFilter to match thogits for deletion
dry_runbooleanNoIf true, return matches without deleting. Default: false
// Request — preview deletion of all done tasks
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bulk_delete_thogits",
"arguments": {
"filter": {
"and": [
{ "has_tag": "Task" },
{ "Task.status": { "match": "done" } }
]
},
"dry_run": true
}
}
}
// Response — dry run shows what would be deleted
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"matched_count\": 5,\n \"affected_count\": 5,\n \"affected_ids\": [\"01J...\", \"01J...\", \"01J...\", \"01J...\", \"01J...\"],\n \"dry_run\": true\n}"
}
]
}
}

Apply a tag to all thogits matching a filter. The tag can be new or existing.

NameTypeRequiredDescription
filterThogitFilterYesFilter to match thogits
tagobjectYesTag to apply: {tag_ref, field_values}
dry_runbooleanNoIf true, return matches without applying. Default: false
// Request — apply a "Reviewed" tag to all high-priority tasks
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "bulk_apply_tag",
"arguments": {
"filter": {
"and": [
{ "has_tag": "Task" },
{ "Task.priority": { "gte": 8 } }
]
},
"tag": {
"tag_ref": { "New": { "name": "Reviewed", "fields": { "reviewer": "String", "approved": "Boolean" } } },
"field_values": { "reviewer": "Alice", "approved": false }
},
"dry_run": false
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"matched_count\": 3,\n \"affected_count\": 3,\n \"affected_ids\": [\"01J...\", \"01J...\", \"01J...\"],\n \"dry_run\": false\n}"
}
]
}
}

Remove a tag from all thogits matching a filter.

NameTypeRequiredDescription
filterThogitFilterYesFilter to match thogits
tag_idstringYesTag ULID to remove
dry_runbooleanNoIf true, return matches without removing. Default: false
// Request — remove "Reviewed" tag from all thogits that have it
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "bulk_remove_tag",
"arguments": {
"filter": { "has_tag": "Reviewed" },
"tag_id": "01JEXAMPLE0000000REVIEWTAG",
"dry_run": false
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"matched_count\": 3,\n \"affected_count\": 3,\n \"affected_ids\": [\"01J...\", \"01J...\", \"01J...\"],\n \"dry_run\": false\n}"
}
]
}
}

Update field values for a tag across all thogits matching a filter. Also updates schema_version to current. Use merge: true for partial updates.

NameTypeRequiredDescription
filterThogitFilterYesFilter to match thogits
tag_idstringYesTag ULID whose fields to update
field_valuesobjectNoField values to set. Omitted fields become null unless merge: true.
mergebooleanNoIf true, merge with existing values instead of replacing. Default: false
dry_runbooleanNoIf true, return matches without updating. Default: false
// Request — mark all in-progress tasks as blocked (merge to preserve other fields)
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "bulk_update_field_values",
"arguments": {
"filter": {
"and": [
{ "has_tag": "Task" },
{ "Task.status": { "match": "in_progress" } }
]
},
"tag_id": "01JEXAMPLE00000000000TAGID",
"field_values": {
"status": { "variant": "blocked", "data": "deployment freeze" }
},
"merge": true,
"dry_run": false
}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"matched_count\": 4,\n \"affected_count\": 4,\n \"affected_ids\": [\"01J...\", \"01J...\", \"01J...\", \"01J...\"],\n \"dry_run\": false\n}"
}
]
}
}