Skip to main content
Glama

get_docker_container_details

Inspect a single Docker container's state, configuration, environment names, mounts, and network settings to troubleshoot runtime issues.

Instructions

Returns a container's state, config, environment names, mounts, and network settings. Environment values and raw command arguments are omitted. Read-only via the Docker API; fatal if the daemon is unreachable or the container is unknown. Use to inspect one container; get_docker_info to list them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "container_id": "<container_id>"
    },
    "name": "get_docker_container_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
container_idYescontainer name or ID

Output Schema

NameRequiredDescriptionDefault
errorsNo
containerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.0
    • addedOutput schema / properties / container / properties / args / description
      Added value: +"always empty to prevent command argument disclosure"
    • addedOutput schema / properties / container / properties / env / description
      Added value: +"environment names with all values redacted"
    • addedOutput schema / properties / container / properties / path / description
      Added value: +"always redacted to prevent command disclosure"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it declares the operation read-only via the Docker API, discloses data masking (environment values and raw command arguments omitted), and states fatal failure modes (daemon unreachable, unknown container). It stops short of describing permission/docker-socket requirements or pagination, but the behavioral profile is substantially covered.

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

Conciseness5/5

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

Four compact sentences, front-loaded with the return payload, then omissions, then failure modes, then routing. No sentence is redundant and none buries the important content.

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

Completeness5/5

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

An output schema exists, so return values need not be specified, yet the description still summarizes them. For a one-parameter read tool it covers scope, exclusions, and error behavior completely — nothing needed to call it correctly is missing.

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 coverage is 100% and the single container_id parameter is already documented as 'container name or ID'. The description adds no further syntax or format detail for the identifier, so the baseline 3 applies.

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?

States a specific verb and resource ('Returns a container's state, config, environment names, mounts, and network settings') and enumerates the returned facets, which distinguishes it from log/stats/top/diff siblings. It also names get_docker_info as the listing counterpart, so the agent can differentiate without opening a schema.

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

Usage Guidelines4/5

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

'Use to inspect one container; get_docker_info to list them' gives an explicit when-to-use and names an alternative that routes the agent correctly. It does not distinguish against closer siblings such as get_docker_container_stats or get_docker_container_logs, which is the only gap.

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