Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Send an ordered batch of input operations to panes. Each executed row repeats send_keys’ effective synchronized-cohort, dead-pane, input-off, pane-mode, attended-client, and inherited-caller preflight, then crosses one tmux dispatch. These observations can race with tmux processing the input. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.

All Rust tools · JSON · Source

Arguments

on_error optional
`stop`, the default, ends at the first refused row; `continue` sends the rest.

Default: "stop".

operations required · array
The rows to send, in order, 1 to 64.

Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema
{
"$defs": {
"OnError": {
"enum": [
"stop",
"continue"
],
"type": "string"
},
"SendOperation": {
"additionalProperties": false,
"properties": {
"enter": {
"default": false,
"description": "Whether to press Enter afterwards.",
"type": "boolean"
},
"keys": {
"description": "tmux key names to press, in order, after any text, such as `C-c`. Omit\nto press none.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"pane": {
"description": "The `%`-prefixed pane id.",
"type": "string"
},
"text": {
"description": "Text typed literally. Key names are not interpreted. Omit to type\nnone.",
"type": [
"string",
"null"
]
}
},
"required": [
"pane"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"on_error": {
"$ref": "#/$defs/OnError",
"default": "stop",
"description": "`stop`, the default, ends at the first refused row; `continue` sends\nthe rest."
},
"operations": {
"description": "The rows to send, in order, 1 to 64.",
"items": {
"$ref": "#/$defs/SendOperation"
},
"type": "array"
}
},
"required": [
"operations"
],
"type": "object"
}
Output schema
{
"$defs": {
"BatchItem": {
"properties": {
"error": {
"anyOf": [
{
"$ref": "#/$defs/ErrorData"
},
{
"type": "null"
}
]
},
"index": {
"minimum": 0,
"type": "integer"
},
"result": true,
"resultTruncated": {
"type": "boolean"
},
"success": {
"type": "boolean"
},
"tool": {
"type": "string"
}
},
"required": [
"index",
"tool",
"success",
"resultTruncated"
],
"type": "object"
},
"ErrorCode": {
"description": "Standard JSON-RPC error codes used throughout the MCP protocol.\n\nThese codes follow the JSON-RPC 2.0 specification and provide\nstandardized error reporting across all MCP implementations.",
"format": "int32",
"type": "integer"
},
"ErrorData": {
"description": "Error information for JSON-RPC error responses.\n\nThis structure follows the JSON-RPC 2.0 specification for error reporting,\nproviding a standardized way to communicate errors between clients and servers.",
"properties": {
"code": {
"$ref": "#/$defs/ErrorCode",
"description": "The error type that occurred (using standard JSON-RPC error codes)"
},
"data": {
"description": "Additional information about the error. The value of this member is defined by the\nsender (e.g. detailed error information, nested errors etc.)."
},
"message": {
"description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"OnError": {
"enum": [
"stop",
"continue"
],
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"failed": {
"minimum": 0,
"type": "integer"
},
"onError": {
"$ref": "#/$defs/OnError"
},
"results": {
"items": {
"$ref": "#/$defs/BatchItem"
},
"type": "array"
},
"stoppedAt": {
"minimum": 0,
"type": [
"integer",
"null"
]
},
"succeeded": {
"minimum": 0,
"type": "integer"
},
"truncated": {
"type": "boolean"
},
"truncatedBytes": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"results",
"succeeded",
"failed",
"truncated",
"truncatedBytes",
"onError"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Send Keys Batch"
}
Esc

Type to search.