run_command
Run a one-off shell command to completion, returning separated stdout/stderr and the true exit code so you can branch on success or failure; report errors only if execution is impossible.
Instructions
执行会自行结束的一次性命令(多条命令/多文件操作请改用 run_batch 一次并行打包;持续盯实时输出且不关心退出码的命令如 tail -f 请改用 observe_stream 直接启动并流式读取;需后台起停服务、等就绪标记并核实进程退出码的任务请改用 spawn_and_observe)。退出码如实返回(非零不是异常——是数据,供条件分支);只有无法执行(超时/中断/连接死)才报错。stdout 与 stderr 分离返回。
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": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | No | 目标层名(缺省=默认层——最近 push_ssh/push_into 的层) | |
| command | Yes | shell 命令 | |
| timeout_ms | No | 超时毫秒(缺省 120000) |