Skip to main content
Glama

docker_container

Read-only

List compose project containers with state, health, and published ports, or get current CPU, memory, network, and disk stats for a service.

Instructions

Lists the containers of a project with their state, health and published ports, or measures with stats what one service consumes right now. A project name no container carries is refused with the names that exist, so an empty list means the host itself runs nothing under compose. Moving a container between states is docker_container_control.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYeslist: every container of the project, with state and health. stats: CPU, memory, network and disk of one service, read at this moment.
profileNoWhich Docker host, by profile name. Default: the profile marked as default.
projectNoWhich compose project. Default: the project of the working directory. A name matching nothing is an error, not a fall back to every container on the host. Omitted with action list: every container the host runs under compose.
serviceNoService name as written in the compose file. Required by action stats.
compose_pathNoWhere the compose file is: the file itself, or the directory holding it. Needed only when no container of the host carries the project label — a project that was never brought up there. A directory holding several compose files is refused with their names rather than guessed through.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statsNo
actionNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=running", "containers[].health=unhealthy" — and only the values this answer used are listed.
reasonNo
projectNo
containersNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark the tool as readOnlyHint=true, and the description adds meaningful behavioral detail beyond that: unknown project names are refused with existing names, an empty list means the host runs nothing under compose, and compose_path is used when no container carries the project label. This gives the agent context about edge cases without contradicting annotations.

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?

Three sentences with no filler. The primary functions are stated first, then a useful edge-case clarification, then the sibling routing. Every sentence earns its place and the structure is easy to scan.

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?

With an output schema present and a readOnlyHint annotation, the description covers all essential guidance for both actions: what list returns, what stats measures, project name refusal behavior, empty-list meaning, and compose_path usage. Nothing critical is missing for an agent to select and invoke this tool correctly.

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 100%, so the input schema already documents all five parameters thoroughly. The description adds contextual color around project name refusal and compose_path, but it does not significantly extend parameter-level meaning beyond what the schema provides. Baseline 3 is appropriate.

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?

The description clearly names the resource (docker containers of a project) and the specific actions: listing state/health/published ports and measuring current resource consumption via stats. It also distinguishes itself from docker_container_control by noting that moving containers between states belongs to that sibling tool.

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?

The description gives solid guidance on when to use this tool: for read-only listing and stats measurement. It explicitly refers moving containers between states to docker_container_control, which prevents misuse. It does not discuss other sibling tools like docker_logs or docker_health, but the main read-oriented selection is clear.

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

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/hypnosis/docker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server