> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 调用桌面工具

> 调用桌面应用工具（通过 WebSocket → JSON-RPC）

通过 WebSocket 向桌面应用发送 JSON-RPC 工具调用请求，等待执行结果返回。超时时间 60 秒。

<ParamField query="user_id" type="string" required>
  用户 ID
</ParamField>

<ParamField body="tool_name" type="string" required>
  工具名称
</ParamField>

<ParamField body="tool_args" type="object" default="{}">
  工具参数
</ParamField>

<ParamField body="session_id" type="string">
  会话 ID（可选，用于路由到绑定的节点）
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  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" }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "result": {
      "stdout": "total 48\ndrwxr-xr-x  12 user  staff  384 Jun 15 10:00 .\n..."
    }
  }
  ```

  ```json 503 theme={null}
  {
    "detail": "Desktop application not connected"
  }
  ```
</ResponseExample>
