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( on_error?: "stop" | "continue", operations: null | 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. Calls up to sixteen eligible inspect tools serially; inner tools receive no separate approval. Retained rows contain full nested envelopes, oversized results are marked resultTruncated, and the complete JSON-RPC response is at most 1,000,000 bytes.

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 in a batch"

Capability

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

Every Go 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": {
"on_error": {
"description": "stop or continue; defaults to stop",
"enum": [
"stop",
"continue"
],
"type": "string"
},
"operations": {
"description": "up to sixteen inspect operations",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"type": "object"
},
"tool": {
"const": "list_sessions",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "only windows in this session name",
"type": "string"
}
},
"type": "object"
},
"tool": {
"const": "list_windows",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"type": "object"
},
"tool": {
"const": "list_panes",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"type": "object"
},
"tool": {
"const": "get_server_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session_id": {
"description": "the session id, such as $1",
"type": "string"
}
},
"required": [
"session_id"
],
"type": "object"
},
"tool": {
"const": "get_session_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"window_id": {
"description": "the window id, such as @1",
"type": "string"
}
},
"required": [
"window_id"
],
"type": "object"
},
"tool": {
"const": "get_window_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
}
},
"required": [
"pane_id"
],
"type": "object"
},
"tool": {
"const": "get_pane_info",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"history": {
"description": "include scrollback as well as the visible screen",
"type": "boolean"
},
"max_lines": {
"description": "maximum lines, keeping the newest",
"type": "integer"
},
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
},
"styles": {
"description": "return terminal colour and attribute escape sequences raw in the lines; off by default",
"type": "boolean"
}
},
"required": [
"pane_id"
],
"type": "object"
},
"tool": {
"const": "capture_pane",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"cursor": {
"description": "a cursor returned by an earlier capture",
"type": "string"
},
"max_lines": {
"description": "maximum new lines, keeping the newest",
"type": "integer"
},
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
}
},
"required": [
"pane_id"
],
"type": "object"
},
"tool": {
"const": "capture_since",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"history": {
"description": "include scrollback as well as the visible screen",
"type": "boolean"
},
"max_lines": {
"description": "maximum lines, keeping the newest",
"type": "integer"
},
"pane_id": {
"description": "the pane id, such as %1",
"type": "string"
},
"styles": {
"description": "return terminal colour and attribute escape sequences raw in the lines; off by default",
"type": "boolean"
}
},
"required": [
"pane_id"
],
"type": "object"
},
"tool": {
"const": "snapshot_pane",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"max_lines": {
"description": "maximum matching panes to return",
"maximum": 200,
"type": "integer"
},
"max_matches_per_pane": {
"description": "maximum matching lines per pane",
"maximum": 200,
"type": "integer"
},
"pattern": {
"description": "bounded text or regular expression to search for",
"maxLength": 4096,
"type": "string"
},
"regex": {
"description": "treat pattern as a regular expression",
"type": "boolean"
}
},
"required": [
"pattern"
],
"type": "object"
},
"tool": {
"const": "search_panes",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"position": {
"description": "top-left, top-right, bottom-left, or bottom-right",
"enum": [
"top-left",
"top-right",
"bottom-left",
"bottom-right"
],
"type": "string"
},
"window_id": {
"description": "the window id, such as @1",
"type": "string"
}
},
"required": [
"window_id",
"position"
],
"type": "object"
},
"tool": {
"const": "find_pane_by_position",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"names": {
"description": "variable names matching [A-Za-z][A-Za-z0-9_]*",
"items": {
"type": "string"
},
"type": [
"null",
"array"
]
}
},
"required": [
"names"
],
"type": "object"
},
"tool": {
"const": "get_tmux_variables",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"effective": {
"description": "include an inherited value",
"type": "boolean"
},
"name": {
"description": "the exact option name",
"type": "string"
},
"scope": {
"description": "global, server, session, window, or pane",
"enum": [
"",
"global",
"server",
"session",
"window",
"pane"
],
"type": "string"
},
"target": {
"description": "the target required by session, window, and pane scopes",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"tool": {
"const": "show_option",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "a session name; omit for the only session",
"type": "string"
}
},
"type": "object"
},
"tool": {
"const": "show_environment",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"name": {
"description": "one hook name; omit to read all hooks in the scope",
"type": "string"
},
"scope": {
"description": "global, server, session, window, or pane",
"enum": [
"",
"global",
"server",
"session",
"window",
"pane"
],
"type": "string"
},
"target": {
"description": "the target required by session, window, and pane scopes",
"type": "string"
}
},
"type": "object"
},
"tool": {
"const": "show_hooks",
"type": "string"
}
},
"required": [
"tool"
],
"type": "object"
}
]
},
"maxItems": 16,
"minItems": 1,
"type": [
"null",
"array"
]
}
},
"required": [
"operations"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"failed": {
"type": "integer"
},
"onError": {
"type": "string"
},
"results": {
"items": {
"additionalProperties": false,
"properties": {
"error": {
"type": [
"null",
"string"
]
},
"index": {
"type": "integer"
},
"result": true,
"resultTruncated": {
"type": "boolean"
},
"success": {
"type": "boolean"
},
"tool": {
"type": "string"
}
},
"required": [
"index",
"tool",
"success",
"error",
"result",
"resultTruncated"
],
"type": "object"
},
"type": [
"array"
]
},
"stoppedAt": {
"type": [
"null",
"integer"
]
},
"succeeded": {
"type": "integer"
},
"truncated": {
"type": "boolean"
},
"truncatedBytes": {
"type": "integer"
}
},
"required": [
"results",
"onError",
"succeeded",
"failed",
"stoppedAt",
"truncated",
"truncatedBytes"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference