Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_docker_stop

Stop running Docker containers by specifying container ID or name. This tool halts container execution to manage resources or troubleshoot issues.

Instructions

停止运行中的 Docker 容器。

Args: params: 包含容器 ID 或名称

Returns: str: 停止结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The handler function `orbstack_docker_stop` which executes `docker stop` using `_run_docker`.
    async def orbstack_docker_stop(params: DockerContainerInput) -> str:
        """停止运行中的 Docker 容器。
    
        Args:
            params: 包含容器 ID 或名称
    
        Returns:
            str: 停止结果
        """
        code, stdout, stderr = await _run_docker(["stop", params.container])
        if code != 0:
            return _format_error(stderr, "使用 orbstack_docker_ps 查看运行中的容器")
        return f"容器 '{params.container}' 已停止"
  • The MCP tool registration for `orbstack_docker_stop`.
    @mcp.tool(
        name="orbstack_docker_stop",
        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