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_window

resize_window( height?: integer, width?: integer, windowId: string, )

Change tmux state; no client-supplied executable input. Set a window’s size in cells. A detached window is whatever size tmux guessed, and a program that formats to its terminal width truncates to that at the source — no capture option recovers those columns, because they were never printed. resize_pane only redistributes space inside a window and cannot grow one. A client attached to the window will overwrite this when it next changes; window-size manual makes a size of your own stick.

MCP request method
tools/call Send resize_window as the tool name, with the arguments below.
Wraps
window.Window.resizeThe library call this tool makes: packages/mcp/src/tools/layout.ts:340.

Arguments

  • height? (integer)

    Set the height, in rows.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • width? (integer)

    Set the width, in columns.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • windowId (string)

    Stable window id, e.g. @1.

    pattern
    "^@\\d+$"

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": {
"height": {
"description": "Set the height, in rows.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"width": {
"description": "Set the width, in columns.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"windowId": {
"description": "Stable window id, e.g. @1.",
"pattern": "^@\\d+$",
"type": "string"
}
},
"required": [
"windowId"
],
"type": "object"
}
Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"window": {
"additionalProperties": false,
"properties": {
"id": {
"description": "Stable window id, e.g. @1.",
"pattern": "^@\\d+$",
"type": "string"
},
"layout": {
"description": "tmux's observed saved layout, including any resizing or pruning; feed it back only when metadataComplete is true.",
"type": "string"
},
"metadataComplete": {
"description": "Whether every projected metadata string is complete.",
"type": "boolean"
},
"name": {
"type": "string"
},
"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"
},
"panes": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"placements": {
"description": "Retained sessions and indexes where this window is linked.",
"items": {
"additionalProperties": false,
"properties": {
"active": {
"description": "Whether this placement is current in its session.",
"type": "boolean"
},
"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",
"active"
],
"type": "object"
},
"type": "array"
},
"placementsComplete": {
"description": "Whether placements contains every placement.",
"type": "boolean"
},
"zoomed": {
"type": "boolean"
}
},
"required": [
"id",
"layout",
"metadataComplete",
"name",
"omittedMetadataBytes",
"panes",
"omittedPlacements",
"placements",
"placementsComplete",
"zoomed"
],
"type": "object"
}
},
"required": [
"window"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference