Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_docker_stop

Idempotent

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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,
        },
    )
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide key behavioral hints: readOnlyHint=false (mutation), idempotentHint=true (safe to retry), destructiveHint=false (non-destructive). The description adds that it stops '运行中的' (running) containers, clarifying scope, but doesn't mention side effects (e.g., container state changes, potential data loss) or error conditions beyond what annotations cover.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured Args and Returns sections. It avoids redundancy but could be more concise by integrating parameter details into a single sentence rather than separate sections.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with annotations covering safety (idempotent, non-destructive) and an output schema (returns str), the description is reasonably complete. It specifies the target (running containers) and parameter semantics, though it lacks error handling or performance details that could aid the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description's Args section specifies that 'params' contains '容器 ID 或名称' (container ID or name), matching the schema's 'container' property. However, it doesn't explain format constraints (e.g., length, uniqueness) or provide examples, offering minimal added value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('停止运行中的' - stop running) and resource ('Docker 容器' - Docker containers). It distinguishes from siblings like orbstack_docker_restart (which restarts) and orbstack_docker_rm (which removes), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., container must be running), exclusions, or comparisons with similar tools like orbstack_docker_restart or orbstack_stop, leaving the agent without contextual usage cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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