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

kill_session

kill_session( force?: boolean, session: string, )

Delete tmux state; accepts no command payload. Remove a session. Windows and panes shared with another session remain available there.

MCP request method
tools/call Send kill_session as the tool name, with the arguments below.
Wraps
session.Session.killThe library call this tool makes: packages/mcp/src/tools/lifecycle.ts:416.

Arguments

  • force? (boolean)

    Allow this to target the pane this server itself was called from, which is otherwise refused. It does not override the refusal to touch a pane a person is watching.

  • session (string)

    Session id ($1) or name.

Result

Returns object

  • killed (string)

    Stable session id, e.g. $1.

    pattern
    "^\\$\\d+$"

No other properties are accepted.

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

Capability

Toolset
Teardown Delete tmux objects or retained scrollback. Not reversible.
Process reach
none
tmux effects
observe delete

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": {
"force": {
"description": "Allow this to target the pane this server itself was called from, which is otherwise refused. It does not override the refusal to touch a pane a person is watching.",
"type": "boolean"
},
"session": {
"description": "Session id ($1) or name.",
"type": "string"
}
},
"required": [
"session"
],
"type": "object"
}
Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"killed": {
"description": "Stable session id, e.g. $1.",
"pattern": "^\\$\\d+$",
"type": "string"
}
},
"required": [
"killed"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference