execute_shell_command
Execute shell commands to automate tasks, retrieve system information, or run scripts through Serena's coding toolkit. Returns command output with optional error capture.
Instructions
Execute a shell command and return its output. If there is a memory about suggested commands, read that first. Never execute unsafe shell commands! IMPORTANT: Do not use this tool to start
long-running processes (e.g. servers) that are not intended to terminate quickly,
processes that require user interaction. Returns a JSON object containing the command's stdout and optionally stderr output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The shell command to execute. | |
| cwd | No | The working directory to execute the command in. If None, the project root will be used. | |
| capture_stderr | No | Whether to capture and return stderr output. | |
| max_answer_chars | No | If the output is longer than this number of characters, no content will be returned. -1 means using the default value, don't adjust unless there is no other way to get the content required for the task. |