{
  "name": "send_keys_batch",
  "wireName": "send_keys_batch",
  "source": {
    "repo": "tmux-python/libtmux-mcp",
    "revision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "extractedRevision": "4daddc0dfca96c43bf521d818bf91564e1434760",
    "file": "src/libtmux_mcp/tools/pane_tools/__init__.py",
    "line": 87
  },
  "description": "Send an ordered batch of raw key/text operations to tmux panes.\n\nUse this for bulk TUI or persistent-shell input where each item is the\nsame kind of low-level terminal interaction as\n:func:`~libtmux_mcp.tools.pane_tools.send_keys`. For authored shell\ncommands that need exit status and captured output, use\n:func:`~libtmux_mcp.tools.pane_tools.run_command` instead. For\nrepeated observation after sending input, use\n:func:`~libtmux_mcp.tools.pane_tools.capture_since` with its returned\ncursor.\n\nThis tool intentionally does not compose heterogeneous operations such\nas send → wait → capture. Keeping the batch homogeneous preserves clear\nper-operation error attribution and avoids embedding a workflow DSL in\nthe MCP tool surface.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "additionalProperties": false,
    "properties": {
      "on_error": {
        "default": "stop",
        "description": "Whether to stop at the first failed operation or keep attempting\nlater operations. Default \"stop\".",
        "enum": [
          "stop",
          "continue"
        ],
        "type": "string"
      },
      "operations": {
        "description": "Ordered raw-input operations to send.",
        "items": {
          "additionalProperties": false,
          "description": "One raw-input operation for batch sending.\n\nUsed by :func:`~libtmux_mcp.tools.pane_tools.send_keys_batch`.",
          "properties": {
            "enter": {
              "default": true,
              "description": "Whether to press Enter after sending keys.",
              "type": "boolean"
            },
            "keys": {
              "description": "Keys or text to send.",
              "type": "string"
            },
            "literal": {
              "default": false,
              "description": "Whether to send keys literally with no tmux key interpretation.",
              "type": "boolean"
            },
            "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."
            },
            "suppress_history": {
              "default": false,
              "description": "Suppress shell history by prepending a space where the shell ignores space-prefixed commands.",
              "type": "boolean"
            },
            "window_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Window ID for pane resolution."
            }
          },
          "required": [
            "keys"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      },
      "timeout": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Maximum time in seconds to allow the batch to run before aborting."
      }
    },
    "required": [
      "operations"
    ],
    "type": "object"
  },
  "outputSchema": {
    "description": "Structured result for a batch of raw-input send operations.",
    "properties": {
      "failed": {
        "description": "Number of operations that failed.",
        "type": "integer"
      },
      "results": {
        "description": "Per-operation results in attempted order.",
        "items": {
          "description": "Per-operation result from batch sending.\n\nReturned by :func:`~libtmux_mcp.tools.pane_tools.send_keys_batch`.",
          "properties": {
            "elapsed_seconds": {
              "description": "Time spent on this operation.",
              "type": "number"
            },
            "error": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Error message for this operation, if it failed."
            },
            "index": {
              "description": "Zero-based index in the submitted operation list.",
              "type": "integer"
            },
            "pane_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Resolved pane ID, or None if target resolution failed."
            },
            "success": {
              "description": "True when this operation sent successfully.",
              "type": "boolean"
            }
          },
          "required": [
            "index",
            "success",
            "elapsed_seconds"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "stopped_at": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Index where processing stopped because on_error='stop', or None when all operations were attempted."
      },
      "succeeded": {
        "description": "Number of operations sent successfully.",
        "type": "integer"
      }
    },
    "required": [
      "succeeded",
      "failed"
    ],
    "type": "object"
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "fastmcp": {
      "tags": [
        "execute"
      ]
    }
  }
}
