{
  "name": "run_command",
  "wireName": "run_command",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/pane_tools/__init__.py",
    "line": 96
  },
  "description": "Run a shell command in a pane, wait for completion, and capture output.\n\nUse for the common terminal workflow: run this command, wait until it\ncompletes, then report whether it succeeded. The command is sent to\nthe pane's interactive shell, followed by a private ``tmux wait-for``\nsignal and a private pane option carrying the shell exit status. This\nis the AUTHORED-output path — the command you pass is what the wait\nsynchronizes on. Reserve ``wait_for_text`` for output you did not\nauthor: another process, a human, or a background job.\n\nThe command runs in a subshell, so ``cd``, ``export`` and other shell\nstate changes do not persist to later calls.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "command": {
        "description": "Shell command to run in the target pane.",
        "type": "string"
      },
      "max_lines": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Maximum pane output lines to return. Defaults to all captured\nvisible output; pass a small value for a tail-only summary."
      },
      "pane_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Pane ID (e.g. '%1')."
      },
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session ID (e.g. '$1') for pane resolution."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Session name for pane resolution."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      },
      "suppress_history": {
        "default": true,
        "description": "For MCP calls, omission uses the server's LIBTMUX_SUPPRESS_HISTORY\ndefault; an explicit value overrides it. Direct Python calls default\nto False. Best effort: the shell must honor space-prefixed history\nsuppression. Suppression requires a single-line command; multiline\ncommands remain available when suppression is false.",
        "type": "boolean"
      },
      "timeout": {
        "default": 30,
        "description": "Maximum seconds to wait for command completion. Capped by the\nsame server wait ceiling as ``wait_for_text``; an over-large\nvalue is not an error — the wait returns at the ceiling and\nthe timeout actually enforced is reported on\n``RunCommandResult.effective_timeout``.",
        "type": "number"
      },
      "window_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Window ID for pane resolution."
      }
    },
    "required": [
      "command"
    ],
    "type": "object"
  },
  "outputSchema": {
    "description": "Result of running a shell command in a pane.",
    "properties": {
      "effective_timeout": {
        "description": "Seconds actually enforced for command completion. Server policy caps the requested ``timeout``; compare against what you passed to see a clamp.",
        "type": "number"
      },
      "elapsed_seconds": {
        "description": "Time spent waiting in seconds",
        "type": "number"
      },
      "exit_status": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Shell exit status, or None when the command timed out"
      },
      "output": {
        "description": "Tail-preserved pane output after the wait completes",
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "output_truncated": {
        "default": false,
        "description": "True when output was tail-preserved to stay within max_lines",
        "type": "boolean"
      },
      "output_truncated_lines": {
        "default": 0,
        "description": "Number of pane lines dropped from the head when truncating",
        "type": "integer"
      },
      "pane_id": {
        "description": "Pane ID that received the command",
        "type": "string"
      },
      "timed_out": {
        "description": "True when the wait timed out",
        "type": "boolean"
      }
    },
    "required": [
      "pane_id",
      "timed_out",
      "elapsed_seconds",
      "effective_timeout"
    ],
    "type": "object"
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "fastmcp": {
      "tags": [
        "execute",
        "self-bounded"
      ]
    }
  }
}
