orbstack_docker_restart
Restart Docker containers managed by OrbStack on macOS to resolve issues or apply configuration changes. Specify container ID or name to initiate restart.
Instructions
重启 Docker 容器。
Args: params: 包含容器 ID 或名称
Returns: str: 重启结果
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- src/orbstack_mcp/server.py:895-907 (handler)The handler function orbstack_docker_restart which executes the docker restart command.
async def orbstack_docker_restart(params: DockerContainerInput) -> str: """重启 Docker 容器。 Args: params: 包含容器 ID 或名称 Returns: str: 重启结果 """ code, stdout, stderr = await _run_docker(["restart", params.container]) if code != 0: return _format_error(stderr) return f"容器 '{params.container}' 已重启" - src/orbstack_mcp/server.py:885-894 (registration)The @mcp.tool decorator registering orbstack_docker_restart.
@mcp.tool( name="orbstack_docker_restart", annotations={ "title": "重启 Docker 容器", "readOnlyHint": False, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, }, )