Skip to content

Batch Operations

Execute DartQL UPDATE and DELETE statements with template variables, array literals, comments, and multi-statement support. This is the preferred tool for bulk operations.

ParameterTypeRequiredDescription
querystringYesOne or more DartQL statements separated by ;
dry_runbooleanNoPreview without executing (default: true)
concurrencyintegerNoMax concurrent API calls per statement (default: 5, range: 1-20)
UPDATE WHERE <expression> SET <field> = <value> [, ...] [COMMENT '<template>']
DELETE WHERE <expression> [CONFIRM]
  • Values: strings ('text'), numbers (42), NULL, arrays (['a', 'b'])
  • Template vars: {field} in COMMENT strings resolves to pre-update task values
  • Safety: dry_run=true by default; DELETE requires CONFIRM when dry_run=false
FieldTypeDescription
batch_operation_idstringID for tracking with get_batch_status
dry_runbooleanWhether this was a preview
statementsarrayResults per statement
total_matchedintegerTotal tasks matched
total_succeededintegerTasks successfully modified
total_failedintegerTasks that failed
execution_time_msintegerTotal execution time

Preview a batch status change:

execute_dartql({
query: "UPDATE WHERE status = 'Todo' AND dartboard = 'Sprint 12' SET status = 'Done'",
dry_run: true
})

Update with a comment template:

execute_dartql({
query: "UPDATE WHERE priority = 5 AND status = 'Todo' SET status = 'Doing' COMMENT 'Auto-started: {title}'",
dry_run: false
})

Multi-statement execution:

execute_dartql({
query: "UPDATE WHERE tags CONTAINS 'v1' SET tags = ['v2']; DELETE WHERE status = 'Archived' AND due_at < '2025-01-01' CONFIRM",
dry_run: false
})

Update multiple tasks matching a DartQL selector expression.

ParameterTypeRequiredDescription
selectorstringYesDartQL WHERE clause
updatesobjectYesFields to update: title, description, dartboard, status, priority, size, assignees, tags, due_at, start_at, parent_task, subtask_ids, blocker_ids, blocking_ids, duplicate_ids, related_ids
dry_runbooleanNoPreview mode (default: true)
concurrencyintegerNoParallel updates (default: 5, range: 1-20)
FieldTypeDescription
batch_operation_idstringTracking ID
selector_matchedintegerTasks matching selector
dry_runbooleanWhether preview mode
preview_tasksarrayMatched tasks (when dry_run=true)
successful_updatesintegerTasks updated
failed_updatesintegerTasks that failed
execution_time_msintegerExecution time

Preview changing priority for a dartboard:

batch_update_tasks({
selector: "dartboard = 'Backlog' AND priority >= 4",
updates: { status: "Doing" },
dry_run: true
})

Execute the update after preview:

batch_update_tasks({
selector: "dartboard = 'Backlog' AND priority >= 4",
updates: { status: "Doing" },
dry_run: false
})

Delete multiple tasks matching a DartQL selector. Tasks move to trash and are recoverable.

ParameterTypeRequiredDescription
selectorstringYesDartQL WHERE clause
dry_runbooleanNoPreview mode (default: true)
confirmbooleanNoRequired when dry_run=false
concurrencyintegerNoParallel deletions (default: 5, range: 1-20)
FieldTypeDescription
batch_operation_idstringTracking ID
selector_matchedintegerTasks matching selector
dry_runbooleanWhether preview mode
successful_deletesintegerTasks deleted
failed_deletesintegerTasks that failed

Preview deletion:

batch_delete_tasks({
selector: "status = 'Archived' AND due_at < '2025-01-01'",
dry_run: true
})

Execute deletion (requires confirm):

batch_delete_tasks({
selector: "status = 'Archived' AND due_at < '2025-01-01'",
dry_run: false,
confirm: true
})

Retrieve the status of a batch operation. Operations are kept in memory for 1 hour.

ParameterTypeRequiredDescription
batch_operation_idstringYesID returned from any batch operation

Returns the full operation result including matched count, success count, failure details, and execution time.

get_batch_status({ batch_operation_id: "batch_abc123" })