ssh_session_send
Write commands or control signals (such as Ctrl+C) to a persistent SSH PTY session and collect incremental terminal output. Detect command completion or shell prompts in long-running sessions.
Instructions
向指定的持久 PTY 终端写入指令或控制信号(如 '\x03' 发送 Ctrl+C),并收集增量屏幕回显
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": {
"sessionId": "<sessionId>",
"input": "<input>"
},
"name": "ssh_session_send"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | 待发送的数据内容或控制字符(如 '\x03' 发送 Ctrl+C) | |
| sessionId | Yes | 目标持久 PTY 终端会话 ID | |
| timeoutMs | No | 当指定 expectPattern 时,最长等待模式匹配超时时间(毫秒),默认 30000ms (30秒) | |
| waitForMs | No | 若未指定 expectPattern,等待收集终端响应输出的时间(毫秒),默认 1000ms | |
| expectPattern | No | 用于主动检测命令完成或 Shell 提示符的正则表达式模式字符串(如 '[$#>:]\s*$'),匹配即刻响应返回 |