shell_execute
Execute local commands as an argv array with optional sudo, stdin, working directory, and timeout settings. Returns stdout, stderr, exit code, and execution details to enable scripting and system administration.
Instructions
Execute one command as an argv array.
Args: command: Executable and arguments, for example ["ls", "-la"] or ["sudo", "systemctl", "status", "ssh"]. Shell syntax is not interpreted. stdin: Optional text sent to the command's standard input. directory: Optional working directory. With WORK_DIR configured, this path must resolve inside WORK_DIR. Without WORK_DIR, any existing directory may be used. timeout: Execution timeout in seconds. Values above 600 seconds are capped at 600.
Returns: stdout, stderr, exit status, execution time, timeout flag, and output-limit flag.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stdin | No | ||
| command | Yes | ||
| timeout | No | ||
| directory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||