MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

tool MCPlatest

send_keys_batch

send_keys_batch( on_error?: OnError, operations: Array<SendOperation>, )
tool [source]

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.

MCP request method
tools/call Send send_keys_batch as the tool name, with the arguments below.

Arguments#

No other arguments are accepted.

Result#

Returns object

Types#

Argument types

OnError: "stop" | "continue"

type

SendOperation: object

type
  • enter? = false (boolean) #

    Whether to press Enter afterwards.

  • keys? (Array<string> | null) #

    tmux key names to press, in order, after any text, such as C-c. Omit to press none.

  • pane (string) #

    The %-prefixed pane id.

  • text? (string | null) #

    Text typed literally. Key names are not interpreted. Omit to type none.

No other properties are accepted.

Result types

BatchItem: object

type

ErrorCode: integer

type

Standard JSON-RPC error codes used throughout the MCP protocol.

These codes follow the JSON-RPC 2.0 specification and provide standardized error reporting across all MCP implementations.

format
"int32"

ErrorData: object

type

Error information for JSON-RPC error responses.

This structure follows the JSON-RPC 2.0 specification for error reporting, providing a standardized way to communicate errors between clients and servers.

  • code (ErrorCode) #

    The error type that occurred (using standard JSON-RPC error codes)

  • data? (any value) #

    Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).

  • message (string) #

    A short description of the error. The message SHOULD be limited to a concise single sentence.

OnError: "stop" | "continue"

type

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Send Keys Batch"

Protocol data#

Use the complete advertised contract for validation and client integration.

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",
"result",
"resultTruncated",
"error"
],
"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",
"stoppedAt",
"truncated",
"truncatedBytes",
"onError"
],
"type": "object"
}
Esc

Type to search.

Reference previewOpen reference