start_batch_job
Starts a server-side batch job that applies one operation to workflows or activities matched by a visibility query or workflow IDs, returning a job ID immediately for tracking in the Temporal Web UI.
Instructions
Start a server-side batch job that applies one operation to every workflow (or standalone activity) matched by a visibility query or a list of workflow IDs. The Temporal server runs the job: this call returns a job_id immediately without waiting, and the job appears on the Temporal Web UI Batch page. Track it with describe_batch_job, list it with list_batch_jobs, and stop it with stop_batch_job. Prefer this over the older batch_* tools, which run client-side, loop inside this MCP call, and do not appear in the UI. Exactly one of 'query' or 'workflow_ids' is required; an empty filter is rejected because it would target the whole namespace.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>",
"reason": "<reason>"
},
"name": "start_batch_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Visibility query selecting the targets, e.g. WorkflowType = "Foo" AND ExecutionStatus = "Running" | |
| job_id | No | Job ID to use (default: mcp-batch-<uuid4>) | |
| reason | Yes | Why the job is running; shown in the UI and audit trail | |
| namespace | No | Temporal namespace for this operation; omit to use the server default | |
| operation | Yes | Operation to apply. cancel_activities/terminate_activities act on standalone activities and take only 'query'. | |
| reset_type | No | Reset point (required for 'reset'; not allowed otherwise) | |
| signal_args | No | Signal argument, encoded with the server's data converter (only for 'signal') | |
| signal_name | No | Signal to send (required for 'signal'; not allowed otherwise) | |
| workflow_ids | No | Explicit workflow IDs to target (workflow operations only) | |
| max_operations_per_second | No | Rate limit for the job (server default if omitted) |