terminal_exec
Run one-shot non-interactive Windows commands and return output and exit code; use interactive start/send tools for prompts, TUIs, or persistent shells.
Instructions
Run a one-shot command to completion and return its output and exit code.
Use this for non-interactive commands. Use terminal_start + terminal_send for programs that need input, a TUI, or a persistent shell.
Args: command: Command line to execute. shell: "powershell", "pwsh" or "cmd". cwd: Working directory. Defaults to the server's current directory. env: Extra environment variables. timeout_ms: Kill the command after this long. max_chars: Maximum output characters returned.
Returns: output, exit_code, timed_out, duration_ms, truncated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| env | No | ||
| shell | No | powershell | |
| command | Yes | ||
| max_chars | No | ||
| timeout_ms | No |