Skip to main content
Glama
docker-mcp
by falkenslab

List containers

list_containers
Read-only

List Docker containers, including stopped ones, with IDs, names, images, states, status, and ports; optionally filter by running state or label to get identifiers for other container actions.

Instructions

List Docker containers, running or not (all unless running is true): id, name, image, state, status and ports. Names and ids are what the other container tools take.

Input Schema

NameRequiredDescriptionDefault
labelNoOnly those with this label, "key" or "key=value", e.g. the one run_container gave them
runningNoOnly the running ones

Output Schema

NameRequiredDescriptionDefault
containersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / label
      Added value: +{
      +  "description": "Only those with this label, \"key\" or \"key=value\", e.g. the one run_container gave them",
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9_./-]*(=[^\\s]*)?$",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description still adds value by disclosing the default scope ('all unless running is true') and the returned fields, though it says nothing about ordering or size on a busy daemon.

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?

Two short sentences, scope stated first, chaining hint second. No filler and nothing buried.

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?

With an output schema present, listing the returned fields is partly redundant, but the default-scope and identifier-chaining notes make the definition complete enough to call correctly. Only result ordering/volume behavior is left unstated.

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%, including the label pattern and example, so the schema carries the parameter burden. The description only adds the default behavior of the running flag ('all unless running is true'), which is a modest but genuine supplement.

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 ('List Docker containers') plus the default scope ('running or not'), which cleanly separates it from inspect_container, container_stats, and other container siblings. The returned fields are enumerated, so an agent knows exactly what it gets back.

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?

'Names and ids are what the other container tools take' tells the agent this is the discovery step feeding start/stop/inspect tools, which is real usage context. It stops short of naming an explicit alternative or exclusion (e.g. when to prefer inspect_container instead).

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