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?: "continue" | "stop", 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. Execute up to 16 declared inspect operations serially; inner operations receive no separate approval.

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

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 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 16 declared inspect calls, executed serially without separate approval for each inner operation.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"includeHistory": {
"default": false,
"description": "Include scrollback.",
"type": "boolean"
},
"joinWrappedLines": {
"default": false,
"description": "Rejoin tmux-wrapped lines.",
"type": "boolean"
},
"maxLines": {
"default": null,
"description": "Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": [
"integer",
"null"
]
},
"paneId": {
"default": null,
"description": "A pane id. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "capture_pane"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"cursor": {
"default": null,
"description": "The opaque cursor returned by the previous call. Omit to start from what is on screen now.",
"type": [
"string",
"null"
]
},
"maxLines": {
"default": null,
"description": "Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": [
"integer",
"null"
]
},
"paneId": {
"default": null,
"description": "A pane id. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "capture_since"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"position": {
"description": "The zero-based pane index.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": "integer"
},
"windowId": {
"description": "The window id.",
"type": "string"
}
},
"required": [
"windowId",
"position"
],
"type": "object"
},
"tool": {
"const": "find_pane_by_position"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"paneId": {
"description": "A pane id.",
"type": "string"
}
},
"required": [
"paneId"
],
"type": "object"
},
"tool": {
"const": "get_pane_info"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"tool": {
"const": "get_server_info"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"description": "A session id or name.",
"type": "string"
}
},
"required": [
"session"
],
"type": "object"
},
"tool": {
"const": "get_session_info"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"names": {
"description": "Variable names such as session_name, without #{...}. Between 1 and 64 names, each at most 64 letters, digits and underscores.",
"items": {
"type": "string"
},
"type": "array"
},
"paneId": {
"default": null,
"description": "A pane id used as the lookup context. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
}
},
"required": [
"names"
],
"type": "object"
},
"tool": {
"const": "get_tmux_variables"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"windowId": {
"description": "A window id.",
"type": "string"
}
},
"required": [
"windowId"
],
"type": "object"
},
"tool": {
"const": "get_window_info"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"default": null,
"description": "A session id or name. Omit for every session.",
"type": [
"string",
"null"
]
},
"windowId": {
"default": null,
"description": "A window id. Omit for every window.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "list_panes"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"tool": {
"const": "list_sessions"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"session": {
"default": null,
"description": "A session id or name. Omit for every session.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "list_windows"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"ignoreCase": {
"default": true,
"description": "Ignore case.",
"type": "boolean"
},
"includeHistory": {
"default": false,
"description": "Search scrollback too.",
"type": "boolean"
},
"maxMatchesPerPane": {
"default": 20,
"description": "Maximum matches per pane.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": "integer"
},
"pattern": {
"description": "A linear-time regular expression, at most 999 UTF-8 bytes. .NET syntax without lookarounds, backreferences or atomic groups.",
"type": "string"
},
"session": {
"default": null,
"description": "A session id or name. Omit for every session.",
"type": [
"string",
"null"
]
}
},
"required": [
"pattern"
],
"type": "object"
},
"tool": {
"const": "search_panes"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"name": {
"default": null,
"description": "One variable name, which answers its value. Omit for every name with hasValue instead of values.",
"type": [
"string",
"null"
]
},
"session": {
"default": null,
"description": "A session id or name. Omit for the server environment.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "show_environment"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"paneId": {
"default": null,
"description": "The pane whose scope is read. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
},
"scope": {
"default": "Session",
"description": "Server, Session, Window, or Pane.",
"enum": [
"Server",
"Session",
"Window",
"Pane"
],
"type": "string"
}
},
"type": "object"
},
"tool": {
"const": "show_hooks"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"name": {
"description": "The option name.",
"type": "string"
},
"paneId": {
"default": null,
"description": "The pane whose scope is read. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
},
"scope": {
"default": "Pane",
"description": "Server, Session, Window, or Pane.",
"enum": [
"Server",
"Session",
"Window",
"Pane"
],
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"tool": {
"const": "show_option"
}
},
"required": [
"tool"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"arguments": {
"additionalProperties": false,
"properties": {
"maxLines": {
"default": null,
"description": "Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": [
"integer",
"null"
]
},
"paneId": {
"default": null,
"description": "A pane id. Omit for this server's own pane, or else the one the first session shows.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"tool": {
"const": "snapshot_pane"
}
},
"required": [
"tool"
],
"type": "object"
}
]
},
"maxItems": 16,
"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"
},
"result": true,
"resultTruncated": {
"type": "boolean"
},
"success": {
"type": "boolean"
},
"tool": {
"type": "string"
}
},
"required": [
"index",
"tool",
"success",
"error",
"result",
"resultTruncated"
],
"type": "object"
},
"type": "array"
},
"stoppedAt": {
"type": [
"integer",
"null"
]
},
"succeeded": {
"type": "integer"
},
"truncated": {
"type": "boolean"
},
"truncatedBytes": {
"type": "integer"
}
},
"required": [
"results",
"succeeded",
"failed",
"stoppedAt",
"truncated",
"truncatedBytes",
"onError"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference