shell
Execute shell commands securely with configurable timeout and working directory for file operations and system tasks. Includes automatic cleanup and error handling.
Instructions
Execute shell commands in a secure sandboxed environment.
This tool allows executing arbitrary shell commands with built-in safety controls
including timeout limits, working directory restrictions, and process cleanup.
Perfect for file operations, system commands, and shell scripting tasks.
Features:
- Configurable timeout (default: 60s, max: 300s)
- Custom working directory support
- Automatic process cleanup
- Sandboxed execution in workspace
- Comprehensive error handling
Args:
request: Shell execution parameters including command, timeout, and working directory
Returns:
ExecutionResponse: Complete execution results with stdout, stderr, exit code,
duration, and success status
Examples:
- List files: {"command": "ls -la"}
- Create directory: {"command": "mkdir -p /workspace/new_folder"}
- Run with timeout: {"command": "long_running_task", "timeout": 120}
- Custom directory: {"command": "pwd", "cwd": "/workspace/subfolder"}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"request": "<request>"
},
"name": "shell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |