MCP conceptTools

Choose documentation 3

Concept and alpha: example support scope and release maturity.

v0.1.0.alpha.2

Current version

v0.1.0.alpha.2
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

toolMCPv0.1.0.alpha.2

tmux_close

tmux_close()
tool[source]

Destroy one exact session, window or pane. Opt-in destructive operation; closing a session or window also removes its contained topology. Never selects by name or closes the daemon directly. Returns the final tmux client outcome.

MCP request method
tools/call Send tmux_close as the tool name, with the arguments below.
Tool selection
Opt in with --enable-tool tmux_close.

Arguments#

No named arguments.

Matches exactly one variant.

Result#

Returns object | object

Matches exactly one variant.

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
false
readOnlyHint
false

Protocol data#

Use the complete advertised contract for validation and client integration.

Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"target": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^\\$[0-9]+$",
"type": "string"
},
"kind": {
"const": "session"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^@[0-9]+$",
"type": "string"
},
"kind": {
"const": "window"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^%[0-9]+$",
"type": "string"
},
"kind": {
"const": "pane"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
}
]
}
},
"required": [
"target"
],
"type": "object"
}
],
"type": "object"
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"data": {
"additionalProperties": false,
"properties": {
"client_exit_status": {
"const": 0
},
"delivery": {
"const": "observed"
},
"target": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^\\$[0-9]+$",
"type": "string"
},
"kind": {
"const": "session"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^@[0-9]+$",
"type": "string"
},
"kind": {
"const": "window"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^%[0-9]+$",
"type": "string"
},
"kind": {
"const": "pane"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^@[0-9]+$",
"type": "string"
},
"index": {
"minimum": 0,
"type": "integer"
},
"kind": {
"const": "window_link"
},
"session_id": {
"maxLength": 32,
"pattern": "^\\$[0-9]+$",
"type": "string"
}
},
"required": [
"generation",
"kind",
"id",
"session_id",
"index"
],
"type": "object"
}
]
}
},
"required": [
"target",
"delivery",
"client_exit_status"
],
"type": "object"
},
"ok": {
"const": true
}
},
"required": [
"ok",
"data"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"delivery": {
"enum": [
"not_sent",
"possibly_sent",
"observed"
]
},
"effects": {
"additionalProperties": false,
"properties": {
"created": {
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^\\$[0-9]+$",
"type": "string"
},
"kind": {
"const": "session"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^@[0-9]+$",
"type": "string"
},
"kind": {
"const": "window"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^%[0-9]+$",
"type": "string"
},
"kind": {
"const": "pane"
}
},
"required": [
"generation",
"kind",
"id"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"generation": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"id": {
"maxLength": 32,
"pattern": "^@[0-9]+$",
"type": "string"
},
"index": {
"minimum": 0,
"type": "integer"
},
"kind": {
"const": "window_link"
},
"session_id": {
"maxLength": 32,
"pattern": "^\\$[0-9]+$",
"type": "string"
}
},
"required": [
"generation",
"kind",
"id",
"session_id",
"index"
],
"type": "object"
}
]
},
"maxItems": 3,
"type": "array"
},
"state": {
"enum": [
"none",
"known",
"unknown"
]
}
},
"required": [
"state",
"created"
],
"type": "object"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message",
"delivery"
],
"type": "object"
},
"ok": {
"const": false
}
},
"required": [
"ok",
"error"
],
"type": "object"
}
],
"type": "object"
}
Esc

Type to search.

Reference preview Open reference