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

call_read_tools_batch

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

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Invoke a serial batch of at most 16 inspect tools. One client approval covers every nested name; inner tools receive no separate approval. Retained rows contain full nested envelopes; oversized results are marked resultTruncated, and the response stays below the 1,000,000-byte wire cap.

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

Arguments

No other arguments are accepted.

Result

Returns object

No other properties are accepted.

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Call read tools batch"

Capability

Toolset
Inspect Request tmux state and terminal output.
Process reach
none
tmux effects
observe

Every Swift 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": {
"description": "Caller-controlled onError.",
"enum": [
"stop",
"continue"
],
"type": "string"
},
"operations": {
"description": "Caller-controlled operations.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"end": {
"description": "Caller-controlled end.",
"maximum": 32767,
"minimum": -2147483648,
"type": "integer"
},
"joinWrapped": {
"description": "Caller-controlled joinWrapped.",
"type": "boolean"
},
"maxLines": {
"description": "Caller-controlled maxLines.",
"maximum": 2000,
"minimum": 1,
"type": "integer"
},
"paneId": {
"description": "Caller-controlled paneId.",
"type": "string"
},
"start": {
"description": "Caller-controlled start.",
"maximum": 32767,
"minimum": -2147483648,
"type": "integer"
}
},
"required": [
"paneId"
],
"type": "object"
},
"tool": {
"const": "capture_pane",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"cursor": {
"description": "Caller-controlled cursor.",
"maxLength": 16384,
"type": "string"
},
"maxLines": {
"description": "Caller-controlled maxLines.",
"maximum": 2000,
"minimum": 1,
"type": "integer"
},
"paneId": {
"description": "Caller-controlled paneId.",
"type": "string"
},
"waitMs": {
"description": "Caller-controlled waitMs.",
"maximum": 10000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"paneId"
],
"type": "object"
},
"tool": {
"const": "capture_since",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"corner": {
"description": "Caller-controlled corner.",
"enum": [
"top-left",
"top-right",
"bottom-left",
"bottom-right"
],
"type": "string"
},
"windowId": {
"description": "Caller-controlled windowId.",
"type": "string"
}
},
"required": [
"corner",
"windowId"
],
"type": "object"
},
"tool": {
"const": "find_pane_by_position",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"paneId": {
"description": "Caller-controlled paneId.",
"type": "string"
}
},
"required": [
"paneId"
],
"type": "object"
},
"tool": {
"const": "get_pane_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {},
"required": [],
"type": "object"
},
"tool": {
"const": "get_server_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "Caller-controlled session.",
"type": "string"
}
},
"required": [
"session"
],
"type": "object"
},
"tool": {
"const": "get_session_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"names": {
"description": "Caller-controlled names.",
"items": {
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
"type": "string"
},
"maxItems": 32,
"type": "array"
},
"paneId": {
"description": "Caller-controlled paneId.",
"type": "string"
}
},
"required": [
"names"
],
"type": "object"
},
"tool": {
"const": "get_tmux_variables",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"windowId": {
"description": "Caller-controlled windowId.",
"type": "string"
}
},
"required": [
"windowId"
],
"type": "object"
},
"tool": {
"const": "get_window_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "Caller-controlled session.",
"type": "string"
},
"window": {
"description": "Caller-controlled window.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"tool": {
"const": "list_panes",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {},
"required": [],
"type": "object"
},
"tool": {
"const": "list_sessions",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "Caller-controlled session.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"tool": {
"const": "list_windows",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"maxMatchesPerPane": {
"description": "Caller-controlled maxMatchesPerPane.",
"maximum": 200,
"minimum": 1,
"type": "integer"
},
"pattern": {
"description": "Caller-controlled pattern.",
"type": "string",
"x-libtmux-max-utf8-bytes": 4096
},
"regex": {
"description": "Caller-controlled regex.",
"type": "boolean"
},
"scrollbackLines": {
"description": "Caller-controlled scrollbackLines.",
"maximum": 2000,
"minimum": 1,
"type": "integer"
},
"session": {
"description": "Caller-controlled session.",
"type": "string"
}
},
"required": [
"pattern"
],
"type": "object"
},
"tool": {
"const": "search_panes",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "Caller-controlled session.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"tool": {
"const": "show_environment",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "Caller-controlled session.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"tool": {
"const": "show_hooks",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"name": {
"description": "Caller-controlled name.",
"type": "string"
},
"scope": {
"description": "Caller-controlled scope.",
"enum": [
"server",
"global_session",
"global_window",
"session",
"window",
"pane"
],
"type": "string"
},
"target": {
"description": "Caller-controlled target.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"tool": {
"const": "show_option",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"maxLines": {
"description": "Caller-controlled maxLines.",
"maximum": 2000,
"minimum": 1,
"type": "integer"
},
"paneId": {
"description": "Caller-controlled paneId.",
"type": "string"
}
},
"required": [
"paneId"
],
"type": "object"
},
"tool": {
"const": "snapshot_pane",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
}
]
},
"maxItems": 16,
"minItems": 1,
"type": "array"
}
},
"required": [
"operations"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"failed": {
"type": "integer"
},
"onError": {
"type": "string"
},
"results": {
"items": {
"additionalProperties": false,
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"index": {
"type": "integer"
},
"result": {
"additionalProperties": false,
"properties": {
"content": {
"items": {
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"text",
"type"
],
"type": "object"
},
"type": "array"
},
"isError": {
"type": "boolean"
},
"structuredContent": {}
},
"required": [
"content",
"structuredContent",
"isError"
],
"type": [
"object",
"null"
]
},
"resultTruncated": {
"type": "boolean"
},
"success": {
"type": "boolean"
},
"tool": {
"type": "string"
}
},
"required": [
"error",
"index",
"result",
"resultTruncated",
"success",
"tool"
],
"type": "object"
},
"type": "array"
},
"stoppedAt": {
"type": [
"integer",
"null"
]
},
"succeeded": {
"type": "integer"
},
"truncated": {
"type": "boolean"
},
"truncatedBytes": {
"type": "integer"
}
},
"required": [
"failed",
"onError",
"results",
"stoppedAt",
"succeeded",
"truncated",
"truncatedBytes"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference