shell_exec
Execute shell commands with detailed error handling and output capture, optionally specifying a working directory, to safely manage tasks on the host system.
Instructions
Executes commands in the specified shell with detailed error handling and output capture
Input Schema
Name | Required | Description | Default |
---|---|---|---|
command | Yes | The shell command to execute in the configured shell environment | |
workingDir | No | Optional working directory to execute the command in (must be under $HOME for security) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"command": {
"description": "The shell command to execute in the configured shell environment",
"minLength": 1,
"type": "string"
},
"workingDir": {
"description": "Optional working directory to execute the command in (must be under $HOME for security)",
"type": "string"
}
},
"required": [
"command"
],
"type": "object"
}