Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_docker_inspect

Read-onlyIdempotent

Inspect detailed Docker container configuration and state information, including network settings, mounts, and environment variables, returned in JSON format.

Instructions

查看 Docker 容器的详细配置和状态信息。

返回 JSON 格式的完整容器信息,包括网络、挂载、环境变量等。

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

Returns: str: 容器详细信息(JSON)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that executes 'docker inspect' via '_run_docker' and formats the output.
    async def orbstack_docker_inspect(params: DockerContainerInput) -> str:
        """查看 Docker 容器的详细配置和状态信息。
    
        返回 JSON 格式的完整容器信息,包括网络、挂载、环境变量等。
    
        Args:
            params: 包含容器 ID 或名称
    
        Returns:
            str: 容器详细信息(JSON)
        """
        code, stdout, stderr = await _run_docker(["inspect", params.container])
        if code != 0:
            return _format_error(stderr)
        # 尝试美化 JSON 输出
        try:
            data = json.loads(stdout)
            if isinstance(data, list) and len(data) == 1:
                data = data[0]
            # 提取关键信息
            summary = {
                "Name": data.get("Name", ""),
                "State": data.get("State", {}).get("Status", ""),
  • The MCP tool registration for 'orbstack_docker_inspect'.
    @mcp.tool(
        name="orbstack_docker_inspect",
        annotations={
            "title": "查看容器详情",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )
Behavior3/5

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

Annotations provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds that it returns 'JSON 格式的完整容器信息,包括网络、挂载、环境变量等' (complete container information in JSON format, including network, mounts, environment variables, etc.), which gives useful context about output content. However, it doesn't mention rate limits, authentication needs, or other behavioral traits 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 concise and well-structured: it starts with the purpose, then specifies the return format and content, and lists Args and Returns sections. Each sentence adds value without redundancy. It could be slightly more front-loaded by integrating parameter info earlier, but it's efficient overall.

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 low complexity (1 parameter, read-only, idempotent), annotations cover safety aspects, and an output schema exists (implied by 'Has output schema: true'), the description is reasonably complete. It explains what the tool does, the parameter, and the return format. For a simple inspection tool, this provides adequate context, though usage guidelines are lacking.

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%, so the description carries more burden. It states 'params: 包含容器 ID 或名称' (params: contains container ID or name), which clarifies the single parameter's purpose. However, it doesn't provide examples, format details, or constraints beyond what's implied. With 0% schema coverage and 1 parameter, this adds basic semantics but lacks depth, aligning with the baseline.

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 容器的详细配置和状态信息' (View detailed configuration and status information of Docker containers). It specifies the verb ('查看' - view/inspect) and resource ('Docker 容器' - Docker containers). However, it doesn't explicitly differentiate from sibling tools like 'orbstack_docker_ps' (which lists containers) or 'orbstack_machine_info' (which inspects machines), so it doesn't reach the highest score.

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 listing containers or 'orbstack_docker_logs' for logs, nor does it specify prerequisites or contexts for use. The only implicit guidance is that it's for inspecting container details, but this is covered by purpose clarity.

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