跳转到主要内容
POST
/
node
/
desktop
/
tool
curl --request POST \
  --url 'https://zeus-api.agentspro.cn/node/desktop/tool?user_id=user_123' \
  --header 'Content-Type: application/json' \
  --data '{
    "tool_name": "run_command",
    "tool_args": { "command": "ls -la" }
  }'
{
  "success": true,
  "result": {
    "stdout": "total 48\ndrwxr-xr-x  12 user  staff  384 Jun 15 10:00 .\n..."
  }
}
通过 WebSocket 向桌面应用发送 JSON-RPC 工具调用请求,等待执行结果返回。超时时间 60 秒。
user_id
string
必填
用户 ID
tool_name
string
必填
工具名称
tool_args
object
默认值:"{}"
工具参数
session_id
string
会话 ID(可选,用于路由到绑定的节点)
curl --request POST \
  --url 'https://zeus-api.agentspro.cn/node/desktop/tool?user_id=user_123' \
  --header 'Content-Type: application/json' \
  --data '{
    "tool_name": "run_command",
    "tool_args": { "command": "ls -la" }
  }'
{
  "success": true,
  "result": {
    "stdout": "total 48\ndrwxr-xr-x  12 user  staff  384 Jun 15 10:00 .\n..."
  }
}