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

resize_pane

resize_pane( amount?: integer, direction?: "up" | "down" | "left" | "right", height?: integer, paneId: string, width?: integer, zoom?: boolean, )

Change tmux state; no client-supplied executable input. Resize a pane, either to a size or by an amount in a direction. Give width/height for an absolute size, or direction with amount for a nudge.

MCP request method
tools/call Send resize_pane as the tool name, with the arguments below.
Wraps
pane.Pane.resizeThe library call this tool makes: packages/mcp/src/tools/layout.ts:137.

Arguments

  • amount? (integer)

    Cells to move by. Needs direction.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • direction? ("up" | "down" | "left" | "right")

    Adjust by an amount in this direction instead of setting a size.

  • height? (integer)

    Set the pane height, in rows.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • paneId (string)

    Stable pane id, e.g. %1.

    pattern
    "^%\\d+$"
  • width? (integer)

    Set the width, in columns.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • zoom? (boolean)

    true makes this pane fill its window, false restores the layout. A state, not a toggle: sending the same value twice is a no-op.

Result

Returns object

No other properties are accepted.

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

Capability

Toolset
Manage Change tmux structure or presentation.
Process reach
none
tmux effects
observe change

Every TypeScript 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"amount": {
"description": "Cells to move by. Needs direction.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"direction": {
"description": "Adjust by an amount in this direction instead of setting a size.",
"enum": [
"up",
"down",
"left",
"right"
],
"type": "string"
},
"height": {
"description": "Set the pane height, in rows.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"paneId": {
"description": "Stable pane id, e.g. %1.",
"pattern": "^%\\d+$",
"type": "string"
},
"width": {
"description": "Set the width, in columns.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"zoom": {
"description": "true makes this pane fill its window, false restores the layout. A state, not a toggle: sending the same value twice is a no-op.",
"type": "boolean"
}
},
"required": [
"paneId"
],
"type": "object"
}
Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"pane": {
"additionalProperties": false,
"properties": {
"active": {
"description": "Whether this is its window's active pane.",
"type": "boolean"
},
"command": {
"description": "The command tmux reports running in it.",
"type": "string"
},
"cwd": {
"description": "Its current working directory.",
"type": "string"
},
"dead": {
"description": "Whether its process exited and remain-on-exit kept it.",
"type": "boolean"
},
"height": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"id": {
"description": "Stable pane id. Prefer this for entity-scoped targeting.",
"pattern": "^%\\d+$",
"type": "string"
},
"index": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"isAttended": {
"description": "A person is currently looking at this pane.",
"type": "boolean"
},
"isCallerPane": {
"description": "This is the pane this MCP server runs in.",
"type": "boolean"
},
"metadataComplete": {
"description": "Whether every projected metadata string is complete.",
"type": "boolean"
},
"omittedMetadataBytes": {
"description": "UTF-8 bytes omitted from projected metadata strings.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"omittedPlacements": {
"description": "Later placements omitted.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"placements": {
"description": "Retained session and window indexes through which this pane is reachable.",
"items": {
"additionalProperties": false,
"properties": {
"index": {
"description": "The window index in this session.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"sessionId": {
"description": "Stable session id, e.g. $1.",
"pattern": "^\\$\\d+$",
"type": "string"
},
"sessionName": {
"type": "string"
}
},
"required": [
"index",
"sessionId",
"sessionName"
],
"type": "object"
},
"type": "array"
},
"placementsComplete": {
"description": "Whether placements contains every placement.",
"type": "boolean"
},
"title": {
"type": "string"
},
"width": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"windowId": {
"description": "Stable window id, e.g. @1.",
"pattern": "^@\\d+$",
"type": "string"
},
"windowName": {
"type": "string"
}
},
"required": [
"active",
"command",
"cwd",
"dead",
"height",
"id",
"index",
"isAttended",
"isCallerPane",
"metadataComplete",
"omittedMetadataBytes",
"omittedPlacements",
"placements",
"placementsComplete",
"title",
"width",
"windowId",
"windowName"
],
"type": "object"
}
},
"required": [
"pane"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference