Skip to main content
Glama

container_list

Read-only

List Docker containers on the daemon, showing running ones by default. Use all=True to include stopped containers, with optional filters, limit, and sparse detail.

Instructions

List containers on the daemon (running only by default).

Pass all=True to include stopped containers. For a compose project compose_ps groups containers by service; for swarm services use service_ps (tasks may live on other nodes).

Args: all: Show all containers, including stopped ones (default False: running only) since: Only show containers created after this id or name before: Only show containers created before this id or name limit: Maximum number of results filters: Filter by attributes (e.g. status, label) sparse: Skip inspect calls and return less detail ignore_removed: Ignore containers removed during listing; inert when sparse=True, which skips the inspect calls that would fail managed_only: Only return containers created by this MCP server (filters on the docker-mcp-server.managed label); combines with any filters given

Returns: list: One dict per container: full inspect payloads by default (each match is inspected, like container_inspect); sparse=True skips the per-container inspect calls and returns the daemon's abridged list entries instead

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNo
limitNo
sinceNo
beforeNo
sparseNo
filtersNo
managed_onlyNo
ignore_removedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A5/5.0
Behavior5/5

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

The description goes well beyond the annotations. It discloses that by default each matching container is inspected (like container_inspect), that sparse=True skips those calls, and that ignore_removed is inert when sparse is true. It also clarifies the return format and the conditional behavior of managed_only. No contradiction with annotations (readOnlyHint=true, destructiveHint=false); the description reinforces and enriches the non-destructive nature.

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?

The description is well-organized with clear sections for the main purpose, argument explanations, and return value details. It front-loads the core behavior and then addresses parameters in a compact but complete bullet list. Every sentence adds value; despite covering many nuances, it avoids redundancy and stays focused.

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?

Given the tool has 8 parameters, no output schema, and multiple behavioral nuances, the description is comprehensive. It explains all parameters, return shapes (full vs sparse), and specifics like managed_only filtering. It also addresses the edge case of ignore_removed with sparse. The agent has enough information to call the tool correctly in any scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 the full burden. It explains all 8 parameters in plain language, including defaults, semantics, and edge cases (e.g., 'ignore_removed is inert when sparse=True'). This fully compensates for the missing schema descriptions and gives the agent precise guidance for each argument.

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 states a specific verb and resource: 'List containers on the daemon', and immediately clarifies the default scope ('running only'). It also distinguishes itself from sibling tools compose_ps and service_ps by naming them explicitly and describing their different grouping semantics, which is exactly what an agent needs to select the right tool.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: 'For a compose project compose_ps groups containers by service; for swarm services use service_ps'. This tells the agent not just what the tool does but also when to choose an alternative. It also gives the default behavior for `all` and explains when each parameter is relevant, leaving no ambiguity about invocation context.

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

Deploy Server

Other Tools