Shell
Execute shell commands from your agent. Supports timeouts, output truncation, and an optional command allowlist for safety.Quick Start
Config
Shell to use (default: platform default, e.g.
/bin/sh).Command timeout in milliseconds.
Max output characters to return. Long output is truncated from the start.
Working directory for commands.
Allowlist of command prefixes. If set, only commands starting with one of these are permitted.
Tools
| Tool | Description |
|---|---|
shell_exec | Execute a shell command. Returns stdout, stderr, and exit code. |
Security
The Shell toolkit includes built-in protections against command injection:- Metacharacter rejection: Commands containing shell metacharacters (
;,|,&,`,$,(,),{,},\,<,>, newlines) are automatically rejected before execution — even if they pass the allowlist check. - Allowlist enforcement: When
allowedCommandsis set, only commands starting with an allowed prefix are permitted.