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

list_sessions

list_sessions()

Inspect tmux metadata; accepts no client-supplied executable input. List the tmux sessions. This reads names and sizes, not terminal text — to find what a pane is showing, use search_panes.

MCP request method
tools/call Send list_sessions as the tool name, with the arguments below.
Wraps
LibTmux.Server.GetSessionsAsyncThe library call this tool makes: src/LibTmux.Mcp/Tools/ReadTools.Hierarchy.cs:75.

Arguments

No named arguments.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"List sessions"

Capability

Toolset
Inspect Request tmux state and terminal output.
Process reach
none
tmux effects
observe

Every C# 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": {},
"type": "object"
}
Output schema
{
"properties": {
"result": {
"items": {
"properties": {
"attached": {
"type": "boolean"
},
"name": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"windowCount": {
"type": [
"integer",
"null"
]
}
},
"required": [
"sessionId",
"name",
"attached",
"windowCount"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"result"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference