execute_batch
Run multiple commands in sequence using PowerShell, CMD, or Git Bash. Stop execution on first failure and set per-command timeout.
Instructions
[Command Execution] Execute multiple commands sequentially
Example usage:
{
"shell": "powershell",
"commands": [
"cd C:\\project",
"npm install",
"npm run build"
],
"stopOnError": true,
"timeout": 300
}Executes commands in order. If stopOnError=true, stops on first failure.
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": {
"shell": "<shell>",
"commands": "<commands>"
},
"name": "execute_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Custom environment variables applied to all commands (optional) | |
| shell | Yes | Shell to use for command execution | |
| timeout | No | Timeout per command in seconds (default: 60) | |
| commands | Yes | Array of commands to execute sequentially | |
| stopOnError | No | Stop execution if a command fails (default: true) |