execute_command
Execute shell commands with full control, capturing stdout, stderr, and return codes. Supports pipelines, redirections, and configurable timeouts.
Instructions
Execute an arbitrary shell command with full control over execution context.
This method allows running simple commands (e.g., ls, cat, echo, pwd, mv) as well as
complex shell pipelines and redirections (e.g., grep pattern file | sort > output.txt).
It captures both standard output and standard error, and returns structured results.
Args: command (str): Command to execute (any valid shell command) cwd (str, optional): Relative Working directory (defaults to data directory) timeout (int, optional): Command timeout in seconds
Returns: Result dictionary with stdout, stderr, and return code
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | . | |
| command | Yes | ||
| timeout | No |