Skip to main content
Glama

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

NameRequiredDescriptionDefault
queryNoVisibility query selecting the targets, e.g. WorkflowType = "Foo" AND ExecutionStatus = "Running"
job_idNoJob ID to use (default: mcp-batch-<uuid4>)
reasonYesWhy the job is running; shown in the UI and audit trail
namespaceNoTemporal namespace for this operation; omit to use the server default
operationYesOperation to apply. cancel_activities/terminate_activities act on standalone activities and take only 'query'.
reset_typeNoReset point (required for 'reset'; not allowed otherwise)
signal_argsNoSignal argument, encoded with the server's data converter (only for 'signal')
signal_nameNoSignal to send (required for 'signal'; not allowed otherwise)
workflow_idsNoExplicit workflow IDs to target (workflow operations only)
max_operations_per_secondNoRate limit for the job (server default if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden and does so well: it discloses that the Temporal server runs the job asynchronously, returns a job_id immediately without waiting, appears on the Web UI Batch page, and can be tracked with sibling tools. It adds safety context around empty filters. It stops short of stating permission requirements or emphasizing that destructive operations like terminate/delete can affect many workflows, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and async return behavior, then provides routing, alternatives, and filter constraints. Every sentence earns its place and there is no redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool with no annotations and no output schema, the description is complete enough to invoke correctly: it explains the server-side asynchronous model, the immediate job_id return, how to track the job, when to prefer it over older tools, and the query/workflow_ids filter constraint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds important cross-parameter meaning beyond the schema: exactly one of query or workflow_ids must be supplied, and an empty filter is rejected because it would target the entire namespace.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: it starts a server-side batch job applying one operation to workflows or standalone activities matched by a query or ID list. It also explicitly distinguishes this tool from describe_batch_job, list_batch_jobs, stop_batch_job, and the older batch_* tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says to prefer this over the older batch_* tools and explains why: those run client-side, loop inside the MCP call, and do not appear in the UI. It also states an invocation constraint: exactly one of query or workflow_ids is required, and an empty filter is rejected to avoid targeting the whole namespace.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.