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.
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. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"cmd": {
"description": "The command line command to run",
"type": "string"
},
"envs": {
"additionalProperties": {
"type": "string"
},
"description": "Environment variables to set when running the command",
"type": "object"
},
"sandbox_id": {
"description": "The ID of the sandbox to run the command on",
"type": "string"
},
"timeout": {
"default": 60,
"description": "The timeout for command execution in seconds. When installing dependencies or performing similar operations, it is recommended to set it to above 120 seconds.",
"type": "integer"
}
},
"required": [
"cmd",
"sandbox_id"
],
"type": "object"
}