exec
Runs a shell command, returning stdout, stderr, and exit code if it finishes quickly; otherwise creates a persistent session and returns its sessionId.
Instructions
Run a shell command efficiently. If it finishes before detachAfterMs, stdout/stderr and exit code are returned in this same MCP call. If still running, it automatically becomes a persistent session and returns sessionId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| shell | No | ||
| command | Yes | ||
| timeoutMs | No | ||
| detachAfterMs | No |