Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_docker_restart

Idempotent

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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

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

Annotations provide good coverage: readOnlyHint=false (mutation), destructiveHint=false (non-destructive), idempotentHint=true (safe to retry). The description adds minimal behavioral context beyond this - it mentions '重启结果' (restart result) but doesn't explain what that entails. No contradictions with annotations.

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

Conciseness3/5

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

The description is brief (4 lines including Args/Returns sections) but inefficiently structured. The first line is clear, but the Args/Returns sections add minimal value. The structure is front-loaded but could be more streamlined.

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

Completeness3/5

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

For a mutation tool with good annotation coverage and output schema, the description is minimally adequate. It states the action and parameter type, but lacks important context about behavior, error conditions, and relationship to sibling tools. The output schema exists, so return values don't need explanation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries full burden. It only states '包含容器 ID 或名称' (contains container ID or name), which repeats what's in the schema properties. It doesn't explain format, validation, or provide examples. With 1 parameter and poor schema documentation, this is inadequate.

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

Purpose4/5

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

The description clearly states the action ('重启' meaning restart) and the resource ('Docker 容器' meaning Docker container). It distinguishes itself from siblings like 'orbstack_docker_stop' (stop) and 'orbstack_docker_run' (run), but doesn't explicitly contrast with them. The purpose is specific and 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when restart is preferred over stop/start, or how it relates to compose tools. There's no context about prerequisites, dependencies, or typical use cases.

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