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.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

tool MCP

send_keys_batch

send_keys_batch( onError?: "continue" | "stop", operations: Array<object>, )

Send input to a pane’s program; a shell that receives it runs it with your user’s permissions. Send several keystrokes to one pane in order, in a single call. Use for a short interactive sequence — open a file, move, type, save — instead of one call per key. Each operation refuses the named pane in a human-owned mode and, when source input expands, every synchronized input cohort peer. A batch has at most 64 steps and 64 KiB of UTF-8 text. Each delay is 0-2000 ms and all delays together must fit the server wait ceiling.

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

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Send keys batch"

Capability

Toolset
Execute Start or drive pane processes, or store state that can control later execution.
Process reach
pane-input
tmux effects
change observe

Every C# tool advertises the same annotations, so a host that approves by annotation cannot tell tools apart. The capability row is what tells them apart.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"onError": {
"default": "stop",
"description": "Stop after the first failed operation, or continue serially.",
"enum": [
"continue",
"stop"
],
"type": "string"
},
"operations": {
"description": "Between 1 and 64 bounded pane-input operations, executed serially.",
"items": {
"additionalProperties": false,
"properties": {
"delayMilliseconds": {
"default": null,
"maximum": 2000,
"minimum": 0,
"type": [
"integer",
"null"
]
},
"enter": {
"default": false,
"type": "boolean"
},
"keys": {
"type": "string"
},
"literal": {
"default": true,
"type": "boolean"
},
"paneId": {
"default": null,
"type": [
"string",
"null"
]
},
"suppressHistory": {
"default": false,
"type": "boolean"
}
},
"required": [
"keys"
],
"type": "object"
},
"maxItems": 64,
"minItems": 1,
"type": "array"
}
},
"required": [
"operations"
],
"type": "object"
}
Output schema
{
"properties": {
"failed": {
"type": "integer"
},
"onError": {
"type": "string"
},
"results": {
"items": {
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"index": {
"type": "integer"
},
"paneId": {
"type": [
"string",
"null"
]
},
"success": {
"type": "boolean"
},
"targetPaneIds": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"index",
"paneId",
"success",
"error",
"targetPaneIds"
],
"type": "object"
},
"type": "array"
},
"stoppedAt": {
"type": [
"integer",
"null"
]
},
"succeeded": {
"type": "integer"
}
},
"required": [
"results",
"succeeded",
"failed",
"stoppedAt",
"onError"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference