remote_exec
Runs shell commands on a remote server through an existing SSH connection, letting you chain multiple commands in one call to avoid new session overhead.
Instructions
在远端服务器执行命令。默认工作目录是 SSH_REMOTE_BASE 指定的目录。把多条命令用 && 串成一次调用更省时间——成本在调用次数,不在命令条数。
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": {
"command": "<command>"
},
"name": "remote_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | 工作目录,默认 SSH_REMOTE_BASE 指定的目录;可用绝对路径或相对路径 | |
| command | Yes | 要执行的 shell 命令 | |
| timeout | No | 超时毫秒数,默认 120000 |