Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_compose_up

Start Docker Compose services in the background. Execute docker compose up -d in a specified directory to launch defined services.

Instructions

使用 Docker Compose 启动服务。

在指定目录中执行 docker compose up -d。

Args: params: 包含项目目录和可选的服务名

Returns: str: 启动结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for orbstack_compose_up, which executes docker compose up -d.
    async def orbstack_compose_up(params: DockerComposeInput) -> str:
        """使用 Docker Compose 启动服务。
    
        在指定目录中执行 docker compose up -d。
    
        Args:
            params: 包含项目目录和可选的服务名
    
        Returns:
            str: 启动结果
        """
        args = ["compose", "-f", f"{params.project_dir}/docker-compose.yml", "up", "-d"]
        if params.service:
            args.append(params.service)
    
        code, stdout, stderr = await _run_docker(args, timeout=180)
        if code != 0:
            return _format_error(stderr)
        return f"Compose 项目已启动\n{stdout or stderr}"
  • Registration of the orbstack_compose_up tool using the @mcp.tool decorator.
    @mcp.tool(
        name="orbstack_compose_up",
        annotations={
            "title": "启动 Compose 项目",
            "readOnlyHint": False,
            "destructiveHint": False,
            "idempotentHint": False,
            "openWorldHint": True,
        },
    )
Behavior3/5

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

Annotations provide substantial information (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false), covering safety and idempotency. The description adds that it runs 'docker compose up -d' (detached mode) and mentions the project directory requirement, which provides useful operational context. However, it doesn't disclose potential side effects like container recreation or network creation that 'docker compose up' might entail.

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 well-structured with clear sections (purpose, execution details, Args, Returns). It's concise at 4 sentences with no wasted words. The information is front-loaded with the core purpose first. The bilingual presentation (Chinese purpose, English labels) is slightly inconsistent but doesn't hinder understanding.

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?

Given the tool's moderate complexity (starting Docker Compose services), the description covers the essential what, how, and parameters. Annotations provide safety/behavioral context, and the output schema exists (though not shown), so return values needn't be detailed. The main gap is lack of explicit differentiation from sibling Docker tools, but overall it's reasonably complete for the task.

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

Parameters4/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 explains that 'params' contains '项目目录和可选的服务名' (project directory and optional service name), which correctly identifies the two parameters. It adds that the service parameter is optional and when unspecified operates on all services. This provides meaningful semantic context beyond the bare schema.

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 tool's purpose: '使用 Docker Compose 启动服务' (use Docker Compose to start services). It specifies the exact command executed ('docker compose up -d') and distinguishes it from other compose operations like 'down' or 'ps'. However, it doesn't explicitly differentiate from other Docker-related tools in the sibling list beyond the compose context.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning '在指定目录中' (in the specified directory) and referencing the 'docker-compose.yml' file, but doesn't provide explicit guidance on when to use this tool versus alternatives like 'orbstack_docker_run' or 'orbstack_machine_start'. It mentions the service parameter is optional but doesn't explain trade-offs or scenarios for specifying services.

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