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.
Bulk Response Format
Section titled “Bulk Response Format”All bulk operations (except bulk_add_thogits) return:
{ "matched_count": 12, "affected_count": 10, "affected_ids": ["01J...", "01J...", "..."], "dry_run": false}| Field | Description |
|---|---|
matched_count | Number of thogits that matched the filter |
affected_count | Number of thogits actually modified |
affected_ids | ULIDs of affected thogits |
dry_run | Whether this was a preview (no changes made) |
bulk_add_thogits
Section titled “bulk_add_thogits”Create multiple thogits in one call. Each entry follows the same schema as add_thogit.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
thogits | array | Yes | Array of thogit objects (name, description, optional tags) |
Example
Section titled “Example”// 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}" } ] }}bulk_delete_thogits
Section titled “bulk_delete_thogits”Delete all thogits matching a filter. Use dry_run: true to preview.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
filter | ThogitFilter | Yes | Filter to match thogits for deletion |
dry_run | boolean | No | If true, return matches without deleting. Default: false |
Example
Section titled “Example”// 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}" } ] }}bulk_apply_tag
Section titled “bulk_apply_tag”Apply a tag to all thogits matching a filter. The tag can be new or existing.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
filter | ThogitFilter | Yes | Filter to match thogits |
tag | object | Yes | Tag to apply: {tag_ref, field_values} |
dry_run | boolean | No | If true, return matches without applying. Default: false |
Example
Section titled “Example”// 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}" } ] }}bulk_remove_tag
Section titled “bulk_remove_tag”Remove a tag from all thogits matching a filter.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
filter | ThogitFilter | Yes | Filter to match thogits |
tag_id | string | Yes | Tag ULID to remove |
dry_run | boolean | No | If true, return matches without removing. Default: false |
Example
Section titled “Example”// 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}" } ] }}bulk_update_field_values
Section titled “bulk_update_field_values”Update field values for a tag across all thogits matching a filter. Also updates schema_version to current. Use merge: true for partial updates.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
filter | ThogitFilter | Yes | Filter to match thogits |
tag_id | string | Yes | Tag ULID whose fields to update |
field_values | object | No | Field values to set. Omitted fields become null unless merge: true. |
merge | boolean | No | If true, merge with existing values instead of replacing. Default: false |
dry_run | boolean | No | If true, return matches without updating. Default: false |
Example
Section titled “Example”// 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}" } ] }}