ssh_session_close
Closes an active SSH session by ID: sends exit to remote shell, clears in-memory history/context, and invalidates the ID. Pass 'all' to close every active session; pooled connections remain.
Instructions
Terminates an open SSH session given its session ID, writing exit to the remote shell, ending it, and discarding its in-memory history and context; the session ID becomes unusable afterward. Destructive to session state but does not delete remote files. Passing the literal value all closes every active session at once, ignoring individual close errors. It does not drop the pooled underlying connection, only the interactive shell.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session": "<session>"
},
"name": "ssh_session_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | Yes | Session ID to close (or "all" to close all sessions) |