Skip to main content
Glama

docker/containers

Read-onlyIdempotent

List Docker containers via the local Engine API without the CLI; filter by state or name, include stopped ones, and return text or JSON.

Instructions

Lists Docker containers through the Engine API on the local socket (no docker CLI needed): name, image, state, status, ports. Read-only. Only running containers unless all: true; state (created, running, paused, exited, ...) filters to one state and implies all; pattern is a glob on the container name (web-*); limit returns the newest N. Every container is listed: the grant's containers: list applies only to docker/manage, docker/logs and docker/exec. Text is a block per container plus a hint line, or No containers found matching the criteria.; output_format: json (also yaml/table/wide) returns an array of objects (name, names, id, full_id, image, image_id, command, state, status, created, ports, labels), [] when empty. For logs use docker/logs, to start or stop docker/manage, for one container's details the docker-container://<name>/status resource. Always runs as root: no privileged argument, refused unless the user's grant has allowed: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoInclude stopped containers (docker ps -a)
limitNoReturn at most this many containers (newest first)
stateNoOnly containers in this state (implies all)
patternNoOnly containers whose name matches this glob (e.g. 'web-*')
output_formatNoUse json for structured output (yaml, table and wide return the same JSON); default is text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent, but the description adds substantial behavioral context beyond them: it always runs as root with no privileged argument, caller requires grant allowed: true or it is refused, empty-result text differs by format, and JSON returns [] when empty. These are exactly the operational facts an agent cannot infer from the annotations.

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?

Front-loaded with purpose and scope, and every sentence carries routing, filtering, or auth information. It is dense and somewhat long for a listing tool, and the output-format behavior is described in two passes (text hint line, then json/yaml/table/wide), which is slightly redundant.

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?

For a five-parameter read-only listing tool with no output schema, the description covers filtering semantics, both return shapes (text block + hint line, or JSON array with named fields), empty-result behavior, and the authorization prerequisite. Nothing an agent needs 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter semantics (state implies all, limit returns the newest N) and worked examples (glob 'web-*') that clarify how the filters interact. It does duplicate some schema text, keeping it from a 5.

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 (Lists), resource (Docker containers), and mechanism (Engine API on the local socket, no docker CLI), then names the exact fields returned. It explicitly distinguishes itself from docker/logs, docker/manage, docker/exec, and the docker-container:// status resource, so an agent can route correctly without opening any schema.

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?

Gives explicit routing rules: 'For logs use docker/logs, to start or stop docker/manage, for one container's details the docker-container://<name>/status resource.' It also states the condition that selects each filter mode (all vs. state vs. pattern vs. limit) and notes the grant's containers: list does not apply here.

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