MCPcopy Create free account
hub / github.com/astercloud/aster / Bash

Function Bash

client-sdks/python-bridge/aster.py:281–295  ·  view source on GitHub ↗

执行 Bash 命令 Args: command: 要执行的命令 timeout: 超时时间(秒) Returns: 执行结果 (包含 stdout, stderr, exit_code)

(command: str, timeout: Optional[int] = None)

Source from the content-addressed store, hash-verified

279
280
281async def Bash(command: str, timeout: Optional[int] = None) -> Dict[str, Any]:
282 """
283 执行 Bash 命令
284
285 Args:
286 command: 要执行的命令
287 timeout: 超时时间(秒)
288
289 Returns:
290 执行结果 (包含 stdout, stderr, exit_code)
291 """
292 params = {"command": command}
293 if timeout is not None:
294 params["timeout"] = timeout
295 return await _bridge.call_tool("Bash", **params)
296
297
298# ========== 工具函数生成器 ==========

Callers

nothing calls this directly

Calls 1

call_toolMethod · 0.80

Tested by

no test coverage detected