MCPpre-alphaTools

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

In development Server behavior and tool contracts may change. Tool availability depends on the server configuration.

tool MCP

get_session_info

get_session_info( session_id?: string | null, session_name?: string | null, socket_name?: string | null, )

Return metadata for a single tmux session (ID, name, window count, activity).

Use this instead of list_sessions + filter when you only need one session’s info. Resolves by session_id first; falls back to session_name.

MCP request method
tools/call Send get_session_info 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

Capability

Toolset
Inspect Request tmux state and terminal output.

Every Python 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": {
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session ID (e.g. '$0')."
},
"session_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session name."
},
"socket_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "tmux socket name."
}
},
"type": "object"
}
Output schema
{
"description": "Serialized tmux session.",
"properties": {
"active_pane_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane id (``%N``) of the session's active pane. Guaranteed non-None on ``create_session`` return (libtmux creates the session with one initial pane). May be None from ``list_sessions`` rows for sessions in transient teardown states where ``active_pane`` is unavailable."
},
"session_attached": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Attached client count"
},
"session_created": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp"
},
"session_id": {
"description": "Session ID (e.g. '$1')",
"type": "string"
},
"session_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session name"
},
"window_count": {
"description": "Number of windows",
"type": "integer"
}
},
"required": [
"session_id",
"window_count"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference