All tools

run_terminal_command

Diagnostics & system · macOS · Windows

Effect: execute (strongest supported action). Status: gated.

Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.

macOS

Purpose

Runs a shell command on the user's Mac and returns its output. Always active. Disabled when LMCP is in read-only mode. Dangerous commands (sudo, recursive deletes of system/home paths, disk formatting, shutdown/reboot, piping a downloaded script into a shell, fork bombs, daemon control) are refused. Destructive: it previews the command first — pass confirm:true to actually run it. Output and runtime are capped.

Required inputs

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — macOS
{
  "properties": {
    "command": {
      "description": "The shell command to run (a single command line, executed with /bin/zsh -lc).",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to actually run. Without it, a preview of the command is returned.",
      "type": "boolean"
    },
    "timeout_seconds": {
      "description": "Max seconds to run before it is terminated (default 20, max 60).",
      "type": "integer"
    },
    "working_dir": {
      "description": "Optional absolute working directory. Defaults to the user's home directory.",
      "type": "string"
    }
  },
  "required": [
    "command"
  ],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "command": "echo Hello from LMCP",
  "confirm": false
}

Windows

Purpose

Runs a shell command on the user's computer. Dangerous commands (sudo/privilege escalation, recursive deletes of system or home paths, disk formatting, shutdown/reboot, piping a downloaded script into a shell, fork bombs) are refused. Destructive: it previews the command first — pass confirm:true to actually run it. Output and runtime are capped. On Windows the command runs via `cmd /c`; elsewhere via `sh -c`.

Required inputs

Permissions and confirmation

Explicit confirmation parameter: inspect the schema and tool description before any real call. The documentation example keeps confirm false. Obtain user authorization before performing the action.

Full input schema — Windows
{
  "properties": {
    "command": {
      "description": "The shell command to run (a single command line).",
      "type": "string"
    },
    "confirm": {
      "description": "Must be true to actually run. Without it, a preview of the command is returned.",
      "type": "boolean"
    },
    "timeout_seconds": {
      "description": "Max seconds to run before it is terminated (default 30, max 60).",
      "type": "integer"
    },
    "working_dir": {
      "description": "Optional absolute working directory. Defaults to the user's home directory.",
      "type": "string"
    }
  },
  "required": [
    "command"
  ],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "command": "echo Hello from LMCP",
  "confirm": false
}