send_keys_batch
Send an ordered batch of raw key/text operations to tmux panes.
Use this for bulk TUI or persistent-shell input where each item is the
same kind of low-level terminal interaction as
:func:~libtmux_mcp.tools.pane_tools.send_keys. For authored shell
commands that need exit status and captured output, use
:func:~libtmux_mcp.tools.pane_tools.run_command instead. For
repeated observation after sending input, use
:func:~libtmux_mcp.tools.pane_tools.capture_since with its returned
cursor.
This tool intentionally does not compose heterogeneous operations such as send → wait → capture. Keeping the batch homogeneous preserves clear per-operation error attribution and avoids embedding a workflow DSL in the MCP tool surface.
All Python tools · JSON · Source
Arguments
on_erroroptional · string- Whether to stop at the first failed operation or keep attempting
later operations. Default "stop".
Default:
"stop". operationsrequired · array- Ordered raw-input operations to send.
socket_nameoptional- tmux socket name.
Default:
null. timeoutoptional- Maximum time in seconds to allow the batch to run before aborting.
Default:
null.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "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"}Output schema
{ "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"}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}