execute_command
Run terminal commands with a specified timeout, ensuring background execution if unfinished. Uses absolute paths for reliability, avoiding issues with relative or tilde paths.
Instructions
Execute a terminal command with timeout.
Command will continue running in background if it doesn't complete within timeout.
NOTE: For file operations, prefer specialized tools like read_file, search_code,
list_directory instead of cat, grep, or ls commands.
IMPORTANT: Always use absolute paths (starting with '/' or drive letter like 'C:\') for reliability. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
command | Yes | ||
shell | No | ||
timeout_ms | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"command": {
"type": "string"
},
"shell": {
"type": "string"
},
"timeout_ms": {
"type": "number"
}
},
"required": [
"command",
"timeout_ms"
],
"type": "object"
}