Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

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
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • 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}' 已重启"
  • 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,
        },
    )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/heresun/orbstack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server