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
send_keys. For authored shell commands that need exit status and captured output, userun_commandinstead. For repeated observation after sending input, usecapture_sincewith 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.
- MCP request method
tools/callSendsend_keys_batchas the tool name, with the arguments below.
Arguments#
-
on_error? ="stop"("stop" | "continue") #Whether to stop at the first failed operation or keep attempting later operations. Default “stop”.
-
operations(Array<object>) #Ordered raw-input operations to send.
-
One raw-input operation for batch sending.
Used by
send_keys_batch.-
Whether to press Enter after sending keys.
-
Keys or text to send.
-
Whether to send keys literally with no tmux key interpretation.
-
pane_id? =null(string | null) #Pane ID (e.g. ‘%1’).
-
session_id? =null(string | null) #Session ID (e.g. ‘$1’) for pane resolution.
-
session_name? =null(string | null) #Session name for pane resolution.
-
suppress_history? =false(boolean) #Suppress shell history by prepending a space where the shell ignores space-prefixed commands.
-
window_id? =null(string | null) #Window ID for pane resolution.
No other properties are accepted.
-
-
-
socket_name? =null(string | null) #tmux socket name.
-
timeout? =null(number | null) #Maximum time in seconds to allow the batch to run before aborting.
No other arguments are accepted.
Result#
Returns object
-
Number of operations that failed.
-
Per-operation results in attempted order.
-
Per-operation result from batch sending.
Returned by
send_keys_batch.
-
-
stopped_at? =null(integer | null) #Index where processing stopped because on_error=‘stop’, or None when all operations were attempted.
-
Number of operations sent successfully.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
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"}