Description
Executes an arbitrary shell command with a bounded timeout and maximum output length, returning raw command output.
Overview
This tool executes an arbitrary shell command via /bin/sh -c using the SpecterInsight Run-Command interface. It provides guardrails for automated execution by enforcing a configurable timeout and a maximum output length, returning raw command output suitable for direct parsing or downstream analysis.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Command |
String | Yes | — | The shell command to execute. The command is passed verbatim to /bin/sh -c. |
MaxLength |
Integer | No | 8192 |
Maximum number of characters returned from command output. Output exceeding this length is truncated. |
Timeout |
Integer | No | 600 |
Maximum execution time in seconds before the command is terminated. |
Behavior
- The command is executed in a non-interactive shell context.
- The working directory is set to a controlled location.
- On success, raw standard output is returned.
- On failure, raw standard error is returned.
- If output exceeds
MaxLength, it is truncated to the specified limit.
Notes
- No validation or sanitization is applied to the command string; callers are responsible for correctness and safety.
- Long-running or highly verbose commands should increase
Timeoutand/orMaxLengthas appropriate. - Shell features such as pipes, redirection, and command substitution are supported.
- This tool is intended for controlled environments where arbitrary command execution is explicitly authorized.
