runCommand
Execute command line operations on a specific Linux sandbox via the 302AI Sandbox MCP Server. Returns text output only, with optional environment variables and timeout settings for efficient task management.
Instructions
Run a command line command on a specific linux sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and download endpoints.
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": {
"cmd": "<cmd>",
"sandbox_id": "<sandbox_id>"
},
"name": "runCommand"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | The command line command to run | |
| envs | No | Environment variables to set when running the command | |
| sandbox_id | Yes | The ID of the sandbox to run the command on | |
| timeout | No | The timeout for command execution in seconds. When installing dependencies or performing similar operations, it is recommended to set it to above 120 seconds. |