Batch Gemini Prompts
gemini-batchRun multiple independent Gemini prompts in parallel for code review, multi-file analysis, and test generation, replacing sequential requests while isolating individual failures.
Instructions
Run multiple independent prompts in parallel, leveraging the existing concurrency infrastructure (semaphore + warm pool). Useful for parallel code review, multi-file analysis, and test generation — replacing N sequential ask-gemini calls with a single request. Returns all results when complete (wait: true, default) or job IDs for polling (wait: false). Individual failures are isolated: other items still complete successfully.
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": {
"prompts": "<prompts>"
},
"name": "gemini-batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Required when the prompt contains 2 or more @file references. A single @file ref is resolved by the CLI without cwd. If cwd is omitted with 2+ @file refs and the client supports elicitation, you will be prompted to provide it. | |
| wait | No | If true (default), block until all prompts complete and return all results inline. If false, return job IDs immediately for polling with gemini-poll. | |
| model | No | Gemini model to use (e.g. gemini-3-flash-preview, gemini-3-pro-preview). Defaults to CLI default. | |
| prompts | Yes | 1–20 independent prompts to run in parallel | |
| expandRefs | No | Set to false to disable @file reference expansion. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | No | ||
| results | No | ||
| summary | No | ||
| pollIntervalMs | No |