Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_compose_ps

Read-onlyIdempotent

Check the running status of services in a Docker Compose project by specifying the project directory path.

Instructions

查看 Docker Compose 项目中各服务的运行状态。

Args: params: 包含项目目录

Returns: str: 服务状态列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function `orbstack_compose_ps` executes the `docker compose ps` command.
    async def orbstack_compose_ps(params: DockerComposeInput) -> str:
        """查看 Docker Compose 项目中各服务的运行状态。
    
        Args:
            params: 包含项目目录
    
        Returns:
            str: 服务状态列表
        """
        args = ["compose", "-f", f"{params.project_dir}/docker-compose.yml", "ps"]
    
        code, stdout, stderr = await _run_docker(args)
        if code != 0:
            return _format_error(stderr)
        return f"Compose 服务状态:\n{stdout}" if stdout else "没有运行中的 Compose 服务"
  • Tool registration for `orbstack_compose_ps` using the `@mcp.tool` decorator.
    @mcp.tool(
        name="orbstack_compose_ps",
        annotations={
            "title": "查看 Compose 服务状态",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )
Behavior4/5

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

The description adds context beyond annotations: it clarifies that this tool checks '运行状态' (running status) for services in a Docker Compose project, which isn't covered by annotations like readOnlyHint or idempotentHint. Annotations already indicate it's safe (readOnlyHint: true, destructiveHint: false), but the description usefully specifies the scope (Compose services). No contradiction with annotations is present.

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 in the first sentence. The Args and Returns sections are structured but could be more integrated. It's concise with minimal waste, though the separation into sections might slightly reduce readability for an AI agent.

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 (checking Compose service status), annotations cover safety (readOnlyHint, etc.), and an output schema exists (indicating returns a string), the description is reasonably complete. It specifies the tool's scope and parameters, though it lacks usage guidance relative to siblings. For a read-only tool with good annotations, this is sufficient.

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 compensates partially by noting '包含项目目录' (includes project directory) in the Args section. However, it doesn't explain the nested 'service' parameter or provide examples. The input schema fully documents parameters (project_dir, service), so the baseline of 3 is appropriate as the schema does the heavy lifting despite low coverage.

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 项目中各服务的运行状态' (View the running status of services in a Docker Compose project). It specifies the verb ('查看' - view) and resource ('Docker Compose 项目中各服务的运行状态' - running status of services in a Docker Compose project). However, it doesn't explicitly differentiate from sibling tools like 'orbstack_docker_ps' or 'orbstack_status', which might have overlapping functionality.

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 sibling tools like 'orbstack_docker_ps' (for general Docker containers) or 'orbstack_status' (for overall Orbstack status), nor does it specify prerequisites or exclusions. The agent must infer usage from the tool name and context alone.

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